Bus Pirate Edu Kit Exercise no.12
From DP
Contents |
Overview
The Circuit
Breadboard legend
IC Location | Breadboard wiring legend | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
- The (+) and (-) next to PIN1 and PIN2 are intended for devices such as LEDs, where PIN1 should be the anode and connected to a higher potential then PIN2.
Bus Pirate Terminal
HiZ>m<<<the menu command
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)
(1)>8<<<select the LCD mode
This mode requires an adapter
Ready
LCD>W<<<turn on the power supplies
POWER SUPPLIES ON
We start the exercise by entering the menu command 'm', and selecting the menu option LCD (8), which enters the Bus Pirate into the LCD mode. This mode is intended for the Bus Pirate LCD adapter v3 board. Since this exercise emulates the LCD adapter board, the mode is perfect for it.
LCD>(2)<<<send the LCD initialization macro
RESET
Display lines:
1. 1
2. Multiple
(2)>2<<<select multiple lines
INIT
Next we need to initialize the LCD, by entering the LCD init macro '(2)', and selecting multiple lines, since the LCD in the exercise has two lines of 16 characters.
LCD>"Bus Pirate"<<<write "Bus Pirate" in the first line
WRITE: "Bus Pirate"
Once initialized the LCD is ready to display the text we send to it. To send text to the display you simply enter a sting you want displayed between quotation marks (""). Make sure the text is not longer then 16 characters, as every character over 16 will no be shown.
LCD>(4)0x40<<<move the cursor to the beginning of the next line
CURSOR SET
If you want to write in the next line, you need to move the cursor to the 2nd line beginning, which on our LCD is addressed as 0x40 (0x0 is the beginning of the first line). To do this we use the 'move cursor macro (4)' followed by the position address (0x40).
LCD>"Edu Kit"<<<write "Edu Kit" in the next line
WRITE: "Edu Kit"
Once the cursor is positioned at the beginning of the next line, simply type in the 16 character text you want show there, again between the quotation marks("").
LCD>m<<<the menu command
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)
(1)>1<<<select the HiZ mode
Ready
HiZ>
Once you're done with this exercise simply enter the menu command 'm' and select the HiZ mode ('1') to shut down the Bus Pirate.