--_003_nrtmr9xjn7ln2skaterswarbrick_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 and > 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 --_003_nrtmr9xjn7ln2skaterswarbrick_ Content-Type: application/octet-stream; name="ra5.asm" Content-Description: ra5.asm Content-Disposition: attachment; filename="ra5.asm"; size=770; creation-date="Sun, 06 Jan 2013 00:52:53 GMT"; modification-date="Sun, 06 Jan 2013 00:52:53 GMT" Content-Transfer-Encoding: base64 I2luY2x1ZGUgPHAxNmYxODI0LmluYz4KCiAgICBFUlJPUkxFVkVMIC0zMDIgOyBCYW5rc2VsIHdh cm5pbmcuCgogICAgIF9fQ09ORklHIF9DT05GSUcxLCBfRk9TQ19JTlRPU0MgJiBfV0RURV9TV0RU RU4gJiBfUFdSVEVfT0ZGICYgX01DTFJFX09OICYgX0NQX09GRiAmIF9DUERfT0ZGICYgX0JPUkVO X09GRiAmIF9DTEtPVVRFTl9PRkYgJiBfSUVTT19PRkYgJiBfRkNNRU5fT0ZGCgogICAgICBfX0NP TkZJRyBfQ09ORklHMiwgX1dSVF9PRkYgJiBfUExMRU5fT0ZGICYgX1NUVlJFTl9PTiAmIF9CT1JW XzE5ICYgX0xWUF9PTgoKICAgICAgVURBVEEKCi5SU1QgY29kZSBoJzAwMDAnCiAgICBnb3RvIHNl dHVwCgouSVNSIGNvZGUgaCcwMDA0JwogICAgcmV0ZmllCgpzZXR1cDoKICAgIGJhbmtzZWwgQU5T RUxBCiAgICBjbHJmICAgIEFOU0VMQQogICAgYmFua3NlbCBUUklTQQogICAgY2xyZiAgICBUUklT QQogICAgYmFua3NlbCBMQVRBCiAgICBjbHJmICAgIExBVEEKICAgIGdvdG8gICAgbWFpbgoKbWFp bjoKICAgIGNscndkdAoKICAgIG1vdmx3ICAgaCdmZicKICAgIGJhbmtzZWwgTEFUQQogICAgbW92 d2YgICBMQVRBCiAgICBub3AKICAgIG5vcAogICAgbm9wCiAgICBub3AKICAgIG5vcAogICAgY2xy ZiAgICBMQVRBCiAgICBub3AKICAgIG5vcAogICAgbm9wCiAgICBub3AKICAgIG5vcAoKICAgIGdv dG8gICAgbWFpbgoKICAgICAgRU5ECg== --_003_nrtmr9xjn7ln2skaterswarbrick_ Content-Type: text/plain; name="ATT00001.txt" Content-Description: ATT00001.txt Content-Disposition: attachment; filename="ATT00001.txt"; size=208; creation-date="Sun, 06 Jan 2013 00:52:53 GMT"; modification-date="Sun, 06 Jan 2013 00:52:53 GMT" Content-Transfer-Encoding: base64 LS0gDQpodHRwOi8vd3d3LnBpY2xpc3QuY29tIFBJQy9TWCBGQVEgJiBsaXN0IGFyY2hpdmUNClZp ZXcvY2hhbmdlIHlvdXIgbWVtYmVyc2hpcCBvcHRpb25zIGF0DQpodHRwOi8vbWFpbG1hbi5taXQu ZWR1L21haWxtYW4vbGlzdGluZm8vcGljbGlzdA0K --_003_nrtmr9xjn7ln2skaterswarbrick_-- .