BenJ
has kindly posted the latest version of PPP and I have been trying it out with mixed success on the 16F1827. Some code downloads fine but some does not. I have a narrowed it down to a very simple bit of code where if I write 0x00 to PORTB the device programs fine but if I write 0xFF to PORTB programming fails and reading the pic gives a string of 3FFF. This happens absolutely consistently. I am usin MPLAB-X and the Microchip ASM interpreter. The code and the 2 hex files are attached. Has anyone experienced anything similar? Possibly I am overlooking something obvious?
code:
---------------------------------------------------
list p=16F1827
errorlevel -302 ; suppress message 302 from list file
#include <p16f1827.inc> ;
; ****** MAIN PROGRAM ******
org 0x00
banksel ansela ;
clrf ansela ;digital i/o on A port
clrf anselb ;digital i/o on B port
banksel trisa
clrf trisb ;port B output
clrf trisa ;Port A output
banksel portb
movlw 0x00 ;Change this to 0xFF and PIC write fails
movwf portb ;turn off display
end
---------------------------------------
Hex file with 0x00 programs without any problems and is fine with values upto 0X3F
------------------------------------------
:020000040000FA
:1000000023008C018D0121008D018C012000003026
:020010008D0061
:040012000034003482
:00000001FF
---------------------------------------
Hex file with 0xFF programing fails (and with any values over 0x40)
------------------------------------------
:020000040000FA
:1000000023008C018D0121008D018C012000FF3027
:020010008D0061
:040012000034003482
:00000001FF
Bug with PPP programming EB006 with 16F1827?
-
- Posts: 13
- Joined: Thu Oct 15, 2009 9:16 am
- Has thanked: 3 times
- Been thanked: 1 time
-
- Posts: 13
- Joined: Thu Oct 15, 2009 9:16 am
- Has thanked: 3 times
- Been thanked: 1 time
Re: Bug with PPP programming EB006 with 16F1827?
Have given up on the 16F1827 and moved to the 1847 which is the chip I hope to use next year. The good news is that it seems to work so far without any problems - code downloaded and ran perfectly first time.
Sean
Sean