![]() ![]() Only at the falling edge on CS (voltage become low) enables the SPI and indicates the start of data or command transmission. First look at the graphic explanation below. Let's see the protocol when communicating to the LCD board. We will talk about how to connect these two devices by wires later. When applying high voltage meaning sending data whileĪpplying low voltage meaning sending command.Ģ.3 Communication between STM32-Nucleo board and ST7735s LCD The following table shows each pinout of the LCD board and its function.ĭata/Command selection. Let's take a look the back side of the LCD board in the following image. (Please refer to the ST7735s datasheet page 59 ~ 72) Then, the specified portion of LCD will change it's color according to the value you wirte into the address in the RAM. Then you can start writing the data (color information) to those address of the RAM. First, you need to let the LCD knows at where of the RAM are you going to write the data to (using X_start, X_end, Y_start, Y_end value). We want to make the top left corner of the LCD display a yellow square. This is call Memory to Display Address Mapping. We can achieve this by sending data to the specific address of RAM (Memory) in the LCD board. We want to display some string or color on the specific location of the LCD. Because SPI is synchronous, it requires clock for sampling. We still need to use this Slave select to let the LCD knowsĬlock. If you have multiple slavesĬonnectes to one master, you can use SS to communicate with (If you use touchscreen, you would need this function) Some basic term of SPI and their function are shown in the below table. The image in the following shows the relationship and connection between master and slave.(image from Sparkfun with some modification to fit our case) Sparkfun has a great tutorial website about SPI ( link). We call our Nucleo board as master and the LCD as slave because we are sending order and command to the LCD. In this tutorial, we will use SPI (Serial Peripheral Interface) to communicate with the output device ~ LCD. There is a big problem, how can this tiny PC communicate with the outside world (such as monitor or keyboard)? Some use wired or wireless. The LCD acts as output and the Potentiometer acts as input in our tutorial. You can think of it as a tiny and simplify PC without monitor(output), keyboard(input), and mouse(input). A series of Youtube tutorial on STM32-Nucleo is a good start if you never use this link ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |