Forum : 8051
Post Information | Post |
---|---|
July 13, 2007 - 11:16am
|
There seems to be a problem with the printf() function on the Atmel 89C5131A device. The code fragment below sends correct data using putchar and incorrect data using printf. code const char test[] = "USBC test V1.04"; void main(void) PLLCON = 0x04; // disable the clock oscillator and PLL (48MHz direct clock) putchar(0x0D); printf("1234567890"); for (;;;) The output is: USBC test V1.04 instead of USBC test V1.04 Using just the printf() function with a string pointer and without the preceding calls to putchar() produces even stranger results. The R51 version is 6.4.37, and the memory model is SMALL. Has anyone else seen this behaviour? |