Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/09/06 18:33
Read: times


 
#109633 - SDCC and Uart problem
Hi,

this is getting really annoying since I can't get even this very easy code to work :) The problem is, that when I compile this code with Keil, evarything works fine. But when I use SDCC to compile it the serial transmitting doesn't work. Otherwise the code works (yes, the led blinking...) also with SDCC. I know that there is a simple answer to my problem, but I just haven't found it yet. I'm wondering what Keil does different when compiling that SDCC...


#include <stdio.h>
#include <ADuC845.h>

int a=0;

void main (void)
{
//UART config
T3CON = 0x83;
T3FD = 0x12;
SCON = 0x52;

while(1)
{
P3 ^= 0x10;

while(!TI);
TI=0;
SBUF = 'A';

for (a=0; a < (10000); a++) {}
}
}


regards,
Jani
Finland

List of 8 messages in thread
TopicAuthorDate
SDCC and Uart problem            01/01/70 00:00      
   when you say it doesnt work...            01/01/70 00:00      
   stdio.h            01/01/70 00:00      
   and it will complian about ADuC845.h            01/01/70 00:00      
   rename 8052.h as ADuC845.h            01/01/70 00:00      
   3 things            01/01/70 00:00      
   header file            01/01/70 00:00      
      stupid me...            01/01/70 00:00      

Back to Subject List