From 4c8cf49b4075c3237014611fca99c7b38bc36825 Mon Sep 17 00:00:00 2001 From: RuhNet Date: Tue, 13 Mar 2018 13:56:31 -0400 Subject: [PATCH] Added Details --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1847cf8..81569be 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,28 @@ # 8051_Test 8051 Test code with 4 bit HD44780 LCD, LEDs, audio frequency generation. -I DO NOT claim that the code is pretty or "correct." Just fiddling with some stuff :-) +I _DO NOT_ claim that the code is pretty or "correct." Just fiddling with some stuff :-) + +YouTube video showing my breadboard and program operation: https://www.youtube.com/watch?v=Z5JveB2_FQQ + +I compile with SDCC: + +sdcc --iram-size 128 --stack-auto lcd.c +packihx lcd.ihx > lcd.hex + +Since my EPROM programmer only handles raw hex data, no special formats, I also do: + +objcopy -I ihex -O binary lcd.hex lcd.bin +xxd -p lcd.bin lcd.bin.hex + +Those two commands give me a raw binary file, and then convert that binary to the raw ascii hex. + +HD44780 LCD is hooked up to MCU as follows: + +LCD: DB4|DB5|DB6|DB7|EN |RS RW +P1: 0 1 2 3 4 5 GND + +LEDs and piezo buzzer or speaker are hooked to pins of P3. I used 2.7k has pullup resistors for the LCD lines on P1. I think 4.7k would be more correct but the 2.7ks were what I had handy. + +My test circuit is on a breadboard, with external EPROM chip (27c64, but I also used 27256 and 27c512 with success). + +