This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problems with UART on a Philips P8xCL883

Hi, I'm a Dutch student busy with my in internship where I have to make an application with a Philips P8xCL883 microcontroller. I would like to use UART to send and receive strings from a PC, but I can not get this to work properly. I searched the web for some interrupt driver routines and found some very nice ones, but implementing these caused some weird problems.

I set the baudrate to 9600, but I can only receive chars when (on the PC) I send them with 28800 baud. If I search the datasheet of the P8xCL883 I did set the prescaler to the right value and I am using the right oscillator. The chars I then receive have a problem as well. For instance, if I send a "b" (binairy 01100010) I receive this as a 11000010. Hereby the 4th bit from the left should not be there and bits 1-3 should be shifted to the right 1 position. This happens with every char I receive. My mentor here can not help me with this and after a week of trying, I do not know where to look anymore.

I hope anyone can give me some clues so that I can get this communication to work. Thanks in advance, Terry.

The P8xCL883 runs on a 3.58 MHz crystal, which is different from a standard 8051. Using the prescaler I should be able to set the frequency for the baudrate, but this does not work for me. A datasheet is available from: http://www-us.semiconductors.philips.com/acrobat/datasheets/P8XCL883_CL884_2.pdf

Parents
  • After reception works ok, I started to work on transmitting chars. It seems that I can not set the TI bit manual (or in software) to enter the interrupt routine. Not by setting the TI = 1; nor by S0CON |= 0x02;.

    Is there a way around this, so that I can enter the interrupt routine without setting the TI bit?

Reply
  • After reception works ok, I started to work on transmitting chars. It seems that I can not set the TI bit manual (or in software) to enter the interrupt routine. Not by setting the TI = 1; nor by S0CON |= 0x02;.

    Is there a way around this, so that I can enter the interrupt routine without setting the TI bit?

Children
No data