piclist 2008\07\02\115848a >
Thread: Bug in MPLAB UART simulation
face BY : Picbits Sales email (remove spam text)

Posted this on the Microchip forums but for those who don't read them here it is again for your reference:

If you write to the UART on the MPLab SIM you can only display up to 0x7F on the UART1 output screen. If its over 0x7F then it will loop around i.e. 0x80 is displayed as 0x00.

Not too much of a problem as you can only really display characters on the screen but its a bigger problem when you come to write the output to a file.

For example :

Set up a routine to write values 0x00 through to 0xFF to the UART
Output the result to a file (i.e. c:\serout.txt)
View the file in a hex editor

You will notice the individual bytes will not go over 0x7F, they loop back around so you get two sets of 0x00-0x7F rather than the expected 0x00-0xFF

Having spent a day of my time trying to work out why my datacapture simulations weren't working properly I gave up and ran it on a real circuit and it worked fine. Its just the simulator which appears to be broken.

I couldn't find anything on the forums or via Google about this so thought I'd stick it up on here just in case it saves anybody else the hassle of trying to work it out.

<47FCC59BA9124EFCB715A7A104FBEA56@FJLAP> 7bit

See also: www.piclist.com/techref/microchip/languages.htm?key=mplab
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Bug in MPLAB UART simulation

month overview.

new search...