Cow Pi mk1f: Arduino Nano form factor, |i2c-italics| communication
Important
You will need a Phillips-head screwdriver to adjust the contrast on the LCD character display. If you do not have one, I have placed a screwdriver at the TA desk in the SRC.
Examine the I2C-LCD serial interface.
Notice that the header has |numberOfSerialPins| pins (:numref:`i2cDisplayModuleHeader`): VCC
(common collector voltage), GND
(ground), |serialPins|.
When the display module is oriented for viewing, these header pins will be on the left.
The display module's header has |numberOfSerialPins| pins.
:numref:`lcd1602FigureDisplayDiagram` shows a diagram of the wiring to connect the display module to the breadboard.
|i2c| connections on at the microcontroller.
Important
:[ ]: | Look at :numref:`i2cFigureDisplays` to determine which display module you have: |
---|
If you have an LCD character display, it might be attached to the serial adapter (:numref:`i2cFigureDisplays`(a)) or the adapter might not be attached to the display (:numref:`i2cFigureDisplays`(b))
- If your I2C-LCD serial interface is NOT attached to the LCD display module, then you will use the breadboard to provide the electrical connections between the serial interface and the display module.
:[ ]: Insert the LCD display module's sixteen pins into contact points |lcd1602Range|. :[ ]: With the four header pins pointing to the left, insert the I2C-LCD serial interface's sixteen downward-pointing pins into contact points |serialAdapterRange|. :[ ]: Take the |numberOfSerialPins|-conductor female-to-male rainbow cable and attach the |numberOfSerialPins| female connectors to the display module’s |numberOfSerialPins| header pins. - If your I2C-LCD serial interface IS attached to the LCD display module, then the sixteen pins connecting the serial adapter to the display module do not need to be inserted into the breadboard.
:[ ]: Take the |numberOfSerialPins|-conductor female-to-male rainbow cable and attach the |numberOfSerialPins| female connectors to the display module’s |numberOfSerialPins| header pins. :[ ]: Optionally place a jumper wire looped from a63 to j63 to prevent the display module from sliding around.
- If your I2C-LCD serial interface is NOT attached to the LCD display module, then you will use the breadboard to provide the electrical connections between the serial interface and the display module.
If you have an OLED graphic display (:numref:`i2cFigureDisplays`(c)):
:[ ]: Insert the header pins into |numberOfSerialPins| adjacent breadboard rows. :[ ]: Take a |numberOfSerialPins|-conductor male-to-male rainbow cable and insert one end into the same rows as the display module’s |numberOfSerialPins| header pins.
:[ ]: | Identify the wire that is connected to the display module's |serialClockPin| pin; insert the male end of this wire in contact point |mcuClockPoint| (electrically connected to the |developmentBoard|'s |mcuClockPin| pin). |
---|---|
:[ ]: | Insert the male end of the |serialDataPin| wire into contact point |mcuDataPoint| (electrically connected to the |developmentBoard|'s |mcuDataPin| pin). |
:[ ]: | Insert the GND wire into the upper |ground|, and the VCC wire into the upper |power|. |
When you have finished connecting the display module, there should be the electrical connections described in :numref:`i2cDisplayModuleConnections`.
Electrical Connections for Display Module.Display Module pin | |developmentBoard| pin | Power/Ground Rail |
---|---|---|
|serialClockPin| | |mcuClockPin| | |
|serialDataPin| | |mcuDataPin| | |
GND |
|ground| | |
VCC |
|power| |
Attention!
CHECKPOINT 8 | |checkpoint| connected the display module to the breadboard. |updateCheckpointsTXT|
If you are using the Arduino IDE:
:[ ]: Open the File ⟶ Examples ⟶ CowPi_stdio ⟶ hd44780_blinky example. If you are using PlatformIO:
:[ ]: Create a new project named DisplayTest with the appropriate board selection for your |developmentBoard|. Without removing anything from your platformio.ini file, add the following to your platformio.ini file, replacing
▶environment_name◀
with the environment name that PlatformIO created automatically for you:[platformio] src_dir = .pio/libdeps/▶environment_name◀/CowPi_stdio/examples/hd44780_blinky [env] lib_deps = docbohn/CowPi @ ^0.7.0 docbohn/CowPi_stdio @ ^0.6.1 monitor_echo = yes
You have now finished assembling the class kit. In the upcoming I/O labs, you will use the kit to learn about memory-mapped I/O and about handling low-level interrupts.