Hello everyone, I hope someone can help me out. I'm kind of stuck. The problem: I have a program which works fine when using a timer to generate the baudrate for the uart. I want to change this to use the internal baudrate generator. I am using the Atmel AT89C51ED2 and have used the code (after my initial try didn't work) from the Armel website.
EA = 0; PCON = 0x10; CKCON0 = 0x7F; CKCON1= 0X01; SCON = 0x50; // UART IN MODE 1 8-BIT, (REN = 1) BDRCON &= 0xEE; // BRR = 0, SRC = 0 BDRCON |= 0x0E; // TBCK=1, RBCK=1, SPD=1 BRL = 100; // APPROX ???? BDRCON |= 0x11; // BRR = 1 ES = 1; EA = 1;