MASTERING STM32 IOT PROJECTS: A Hands-on Guide for STM32 to Build Secure and Scalable IoT Solutions

Bog
  • Format
  • Bog, hæftet
  • Engelsk
  • 278 sider

Beskrivelse

¿Whoever wants to understand the library irrespective of what MCU you are using. This is the eye to see LCD library source file that we are going to discuss today. Before we jump into it, let's see the connection one more time. This is how the PCF 8574 is connected with the LCD, and as you can see, it only requires two wires to be connected to the MCU.

¿Here I am showing the connection with the STM 32, but it remains the same for whatever MCU you are using. All you need to do is connect the clock pin to the eye to see clock and the data pin to the eye to see data. The Vcc must be five volts and ground to ground.

¿This is how the actual PCF 8574 looks like and as you can see, this end must be connected to the LCD VSS and the other end to the LED minus pin. By the way, you can control the LCD contrast using this potentiometer here. This picture actually represents how the PC F is connected internally. This is very important to understand as our library will be written based on this connection diagram. As you can see, only the four pins p four to P seven are connected to the LCD data pins.

¿The pins P zero, P one and P two are connected to the RS RW and enable pins respectively. Although it's not shown here, this pin p3 is actually connected to the LCD backlight. Now that we have seen the connection, let's check out the LCD 16 02 data sheet also, there are a lot of data sheets available, but things mostly remain the same across them. First of all, we will check the initialization part. As shown here.

¿This is the pattern to initialize the LCD in four bit mode. We have seen in the connection diagram that only four pins from the PCF are actually connected to the data pins, and therefore we need to use the four bit mode for the LCD. As mentioned, first, we need to wait for more than 15 milliseconds and then we need to send this notice here that the eye spit represents whether we are sending a command all the data in order to send the command this bid must be zero, and to send the data it must be one.

Læs hele beskrivelsen
Detaljer
Størrelse og vægt
  • Vægt376 g
  • Dybde1,5 cm
  • coffee cup img
    10 cm
    book img
    15,2 cm
    22,9 cm

    Findes i disse kategorier...

    Velkommen til Saxo – din danske boghandel

    Hos os kan du handle som gæst, Saxo-bruger eller Saxo-medlem – du bestemmer selv. Skulle du få brug for hjælp, sidder vores kundeservice-team klar ved både telefonerne og tasterne.

    Om medlemspriser hos Saxo

    For at købe bøger til medlemspris skal du være medlem af Saxo Premium, Saxo Shopping eller Saxo Ung. De første 7 dage er gratis for nye medlemmer. Medlemskabet fornyes automatisk og kan altid opsiges. Læs mere om fordelene ved vores forskellige medlemskaber her.

    Machine Name: SAXO082