> You're passing to pgm_read_byte_near() character values taken from data memory at the address of BootString in program memory. I would expect some kind of warning from the compiler about the implicit cast from the char value to the pointer expected as the argument. Do you have all the warnings turned on?
Well.. I thought so.. :)
Casting is something that I'm not up on yet.
> You need to pass to pgm_read_byte_near() the address of the character you want to read, thus:
> LCD_Data_A = pgm_read_byte_near( &(BootString[i]) );
Ah.. So the final form, since I was using LCD_Data_A as an
intermediate to see what was being passed, is:
for (i=0; 16 > i; i++) {
lcd_putc(pgm_read_byte_near(&(BootString[i])));
}
So since this is the address of the char, what was I passing it without the &?
> Graham.
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
--
There is no computer problem which cannot be solved by proper
application of a sufficiently large hammer.Message
Re: [AVR-Chat] Re: WinAVR / GCC question re Stack
2009-03-25 by David VanHorn
Attachments
- No local attachments were found for this message.