pic32 spi驱动pmodcls lcd液晶屏
- UID
- 1029342
- 性别
- 男
|
pic32 spi驱动pmodcls lcd液晶屏
ps: pmodcls这种东西确实不如1602好用,想当时就不该申请这个,随便别的什么配件都比这个给力。考虑到之后一定会使用spi接口就拿这个lcd练手。弄了两天出了很多问题,最后还得抱爽哥的大腿~~~
我们使用申请的pmodcls液晶显示模块。pmodcls框图如下:
基本参数:
- 16x2字符显示屏
- 通过使用UART、SPI或者TWI接口来灵活连接
- 简单的终端显示接口
- 尺寸大小:3.75英寸x 1.75英寸
- 套件中附带一个6英寸6针下载线和一个6针接口
工作方式的描述如下:
The module is capable of executing a variety of instructions, such as erasing specific characters,
setting different display modes, scrolling, and displaying user-defined characters. These instructions
are specified using escape sequences to send commands to the board.s embedded Atmel ATmega48
microcontroller.
感觉跟1602是一样的东西。。。
Communication with the PmodCLS is using a UART, SPI, or TWI
(Phillips I2C compatible) serial connection.
1、通信方式的设置。通过设置跳线MD0-2实现各种不同模式的选择。(我居然没有分D和E系列的lcd板子,结果这个地方跳线连反了,后来经爽哥摆弄才发现)
2、电源选项
The PmodCLS can be powered through
the board‟s 6-pin headers J1 or J2, or through connectors J6 or J7.
我闷使用SPI方式驱动液晶屏。
话说pmodcls强大啊,居然还有个atmega48
3、开发板的连接:直接将SPI #1齐刷刷的接到pmodcls的J1接口即可。
4、spi的工作模式:个人以为像一个16位寄存器,每一个spi周期发送完一个字节以后,立即返回一个字节。对于spi来说接受和发送是同一个函数。
When one “transmits” data, the incoming data must be read before attempting to
transmit again.
If the incoming data is not read, then the data will be lost and the
SPI module may become disabled as a result.
Always read the data after a transfer
has taken place, even if the data has no use in your application.
Data is always “exchanged” between devices.
No device can just be a “transmitter”
or just a “receiver” in SPI.
However, each device has two data lines, one for input
and one for output.
|
|
|
|
|
|