RA5 has historically been open drain on some parts. Is that maybe the case here? On my phone so I can't check the datasheet... MikeH On Jan 5, 2013 5:49 PM, "Rupert Swarbrick" wrote: > Rupert Swarbrick writes: > > Jan-Erik Soderholm writes: > >> First, use proper CONFIG directivs including the supplied > >> symbols from the include file. See example in 16F1827TMPO.ASM. > > > > Shall do! > > > >> Then, how does the code work in MPSIM ? > > > > Right, I hadn't been using MPlab (since the editor is just so horrible > > when you're used to Emacs), but fought enough to run the example > > and... I get the behaviour I was seeing (yay!) > > > > So I must be making a software error. I'll hunt around a little more an= d > > see if I can narrow it down. > > Well, this is totally mystifying. I'm sure I was running the code I > posted, and variants of it, in MPSIM under MPLAB-X an hour ago and LATA > was being updated, but PORTA wasn't (on bit 5, anyway). > > However, after cursing and giving up (exiting MPLAB-X), I tried again > and can't seem to make MPSIM give me anything but what I'd expect: PORTA > and LATA are perfectly in sync unless I forget to configure > _FOSC_INTOSC. > > Needless to say, the two chips I've tried programming still change all > PORTA pins except RA5 and RA3. > > I'm attaching the test file I've been using most recently: all pins of > PORTA except RA5 (pin 2) and RA3 (input only) change on the > breadboard. All but RA3 change in the simulator. > > Can anyone think of what I could be doing wrong? Either to get seemingly > inconsistent results from a simulator (which I really can't believe > actually happened!) or to have such weird behaviour from the chips? > > Rupert > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .