View Single Post
  #3   Spotlight this post!  
Unread 07-02-2008, 23:19
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Printf prints only the first character

Your last two parameters in the third printf() are single bytes. The %d specification wants to see two-byte integers. You are thus causing it to try to read more data than you've provided, which results in really really weird printing.

If those last two things are really single bytes, make the printf() happy by saying (int)EEPROM_Read(...). Otherwise, correct them to say EEPROM_Read2Byte(...).