While interfacing to a hd44780a-compatible module from a PIC18F2455 I noticed some strange things.
Using printf produced no output.
unsigned char a = 0;
const char msg = "Hello world!";
produced a full display of 'HHHHHHHHHHHHHHHHHHHHH'
produced 'l' as expected.
produced the usual universal greeting.
To try to determine if the problem is in indexing a string or just looping, I added this code and expected an output of '0 1 2 3 4 ':
putchar('0' + a);
but got only '0 1 1 1 1 1 1 1 1 1 1 1 1 ' (as far as the display reached)
So, either I'm doing something REALLY stupid ("Duh, you cant use loops in main!") or there's a bug in the code that produces loops in SDCC pic16.
Strangely, there should be some loops in the delays in the LCD-interface and those seems to work (might be in assembler), but with my head clogged in a cold I can't investigate now.
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.2 #5202 (Aug 4 2008) (UNIX)
I've tried both amd64 and i386 versions. Problem first discovered in a version that was a few days older (maybe a week)
Log in to post a comment.