Hallo,
ich habe ein LCD gemäß 4-Bit mit Busy an Port C angeschlossen.
Das ganze mit WinAVR übertragen:
Ich habe aber das weit verbreitete Problem mit den 2 schwarzen bzw. 2 weißen Balken.Code:> "make.exe" program Compiling C: rn-control.c avr-gcc -c -mmcu=atmega32 -I. -gdwarf-2 -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./rn-control.lst -I. -std=gnu99 -MMD -MP -MF .dep/rn-control.o.d rn-control.c -o rn-control.o Compiling C: lcd.c avr-gcc -c -mmcu=atmega32 -I. -gdwarf-2 -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./lcd.lst -I. -std=gnu99 -MMD -MP -MF .dep/lcd.o.d lcd.c -o lcd.o Linking: rn-control.elf avr-gcc -mmcu=atmega32 -I. -gdwarf-2 -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=rn-control.o -I. -std=gnu99 -MMD -MP -MF .dep/rn-control.elf.d rn-control.o lcd.o --output rn-control.elf -Wl,-Map=rn-control.map,--cref -lm Creating load file for Flash: rn-control.hex avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock rn-control.elf rn-control.hex Creating load file for EEPROM: rn-control.eep avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \ --change-section-lma .eeprom=0 --no-change-warnings -O ihex rn-control.elf rn-control.eep || exit 0 avrdude -p atmega32 -P com4 -c stk500v2 -U flash:w:rn-control.hex avrdude: stk500_2_ReceiveMessage(): timeout avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.04s avrdude: Device signature = 0x1e9502 avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file "rn-control.hex" avrdude: input file rn-control.hex auto detected as Intel Hex avrdude: writing flash (722 bytes): Writing | ################################################## | 100% 0.89s avrdude: 722 bytes of flash written avrdude: verifying flash memory against rn-control.hex: avrdude: load data flash data from input file rn-control.hex: avrdude: input file rn-control.hex auto detected as Intel Hex avrdude: input file rn-control.hex contains 722 bytes avrdude: reading on-chip flash data: Reading | ################################################## | 100% 0.48s avrdude: verifying ... avrdude: 722 bytes of flash verified avrdude done. Thank you. > Process Exit Code: 0 > Time Taken: 00:22
Text bekomme ich nicht auf das Display, egal in welcher Zeile
Ein Datenblatt von dem Display habe ich allerdings nichtCode:#include <stdlib.h> #include <avr/io.h> #include "lcd.h" #include "rn-control.h" int main(void) { for(;;){ /* Initialisiere Display, Cursor aus */ lcd_init(LCD_DISP_ON); /* loesche das LCD Display und Cursor auf 1 Zeile, 1 Spalte */ lcd_clrscr(); /* String auf Display anzeigen */ lcd_puts("Hello world.\n"); lcd_puts("testme\n"); } return 0; }![]()
auf dem Display steht nur was von "JHD 204A".
Wie bekomme ich Text auf das Display?
gruß
pod32







Zitieren


Lesezeichen