Searching \ for '[PIC] Bug in MPLAB UART simulation' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/languages.htm?key=mplab
Search entire site for: 'Bug in MPLAB UART simulation'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Bug in MPLAB UART simulation'
2008\07\02@115848 by Picbits Sales

flavicon
face
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.

Dom

2008\07\02@122618 by Picbits Sales

flavicon
face
And another one.

Found this while searching - seems this problem has been happening with
MPLab for the past 3 or so years.

http://forum.microchip.com/tm.aspx?m=90295

And my latest ticket to Microchip ........

Just found another bug - if you output the character 0x0A, it automagically
pops a 0x0D before the 0x0A in the output file

i.e. instead of seeing an output of :

0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B

In the output file you actually get

0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0D,0x0A,0x0B

More... (looser matching)
- Last day of these posts
- In 2008 , 2009 only
- Today
- New search...