PDA

View Full Version : 18F87J50 - is there a typo in the .info file/MeLabs software or do I need sleep?



Christopher4187
- 27th May 2013, 03:29
I've spent the better part of my weekend trying to figure out a problem I was having with the 18F87J50. The problem I was tracing ended up being a hardware issue but while troubleshooting I noticed something that doesn't make sense to me. It could be me but I don't understand it.

In the PIC18F87J50.INFO file, the external memory bus configuration bits are displayed below:


; External Memory Bus Configuration bits
; MODE = MM ;Microcontroller mode - External bus disabled
; MODE = XM12 ;Extended Microcontroller mode - 12-bit Address mode
; MODE = XM16 ;Extended Microcontroller mode - 16-bit Address mode
; MODE = XM20 ;Extended Microcontroller mode - 20-bit Address mode

In MeLabs programmer version 4.50, the same items are displayed. However, the order they are displayed is the exact opposite of what the .info file lists them as. In other words, the MeLabs programmer software lists the items in this (opposite) order:

20 bit address mode
16 bit address mode
12 bit address mode
disabled

In my config file, I was using "CONFIG MODE = MM" but the 20 bit address mode would be displayed with the MeLabs programmer software after everything is compiled. The then put "CONFIG MODE = XM20" and then the MeLabs programmer software would say the external memory is disabled. The same situation applies to XM16 where it's flipped with XM12.

I only realized this because when I used "CONFIG MODE = XM20," my program will not run. I thought the external memory was disabled because the MeLabs programmer software stated "disabled." I'm almost embarrassed to say how long (and late) I actually spent troubleshooting this problem. Once I took a left turn, I kept going and didn't look back.

To put it in simpler terms, MeLabs programmer software will show the external memory bus is disabled if I use XM20 in my config file when in fact it is really using the 20 bit address. Conversely, if I use MM in my config file, the MeLabs programmer software will show the external memory is using the 20 bit address when in fact it's really disabled.

Can someone verify this for me and make sure I'm not going insane?

comwarrior
- 28th May 2013, 13:35
can you post your configuration header, just incase you have a typo or something...