hi all, i would like to know whether it is possible to change the baudrate of the serial port to different rates, i have a program which have to communicate with different devices with different baudrates. I try to change the BRGR0 and BRGR1 values but when that part of the code is executed in the simulator, the values do not change to another baudrate different from the default value(115200). Is the code executed not working on simulation or do i have to reset a Register to trigger that UART must be restarted. Any help is appreciated. Many thanks, khaled Sarsam
it executes the commando's to reload the values of BRGR's with 0x01 and 0x70 for 19200. After that is been done, the serial perpherial show's still 115200 two possibilities: *your code is wrong - did you step through the setting routine and see the actual asm. *since the BGR is unique, the simulator does not reflect it correctly, after all it IS a simulator. a simple test would be to temporarily change the code where the 115k is set to set something else and see what happens. Erik
also With a simulator, there is no guarantee that the behaviour will be the same on an actual chip. No simulator (that you can afford) will be "perfect". Erik
thank you people all for the support, I saw the ASM file and indeed the values are changed to the desired values in the BRGR, I think the simulator doesnot scan again to see whether the values in the BRGRs are changed whether not so that's why it sticks to the first baudrate selected. Thank you all, i will test it on my evaluation board when i get it back from my friend, best wishes, khaled