Serial Communication for 16F84A
Hi,
I have following PBP code. When trying to program this code's HEX file into PIC 16F84 using PIC Kit2, the programs fails to be written. Kindly help.
include "modedefs.bas"
trisb =%00000100
valor var byte
start:
low portb.0
low portb.1
serin portb.2,N2400,valor
if valor == "O" then
high portb.0
else
LOW portb.0
ENDIF
IF valor == "X" THEN
HIGH portb.1
ELSE
LOW portb.1
ENDIF
IF valor == "S" THEN
HIGH portb.0
HIGH portb.1
ELSE
LOW portb.0
LOW portb.1
ENDIF
goto start
Re: Serial Communication for 16F84A
I compiled your code and when choosing the programmer PICKIT2 does not get highlighted. You may not be able to program it directly using PICKIT2 through MPLAB. Try loading the hex file using only pickit2 standalone application.
Re: Serial Communication for 16F84A
Hi,
Thank You for your reply. I directly import the HEX file in the PICKit2. Still, the problem appears. Even for me, compilation was no problem and the code compiled successfully in PBP. Only problem is that the HEX file is not getting loaded in the PIC. PICKit2 shows error while loading the HEX file.
Kindly help.
Regards
Shivam
Re: Serial Communication for 16F84A
What is the error? Did you tried with another 84A?
Re: Serial Communication for 16F84A
The error is "Verification of configuration failed." I tried other loading other HEX files into the same 84A and they were successfully uploaded, so guess there is no problem with the PIC.
Regards
Shivam
Re: Serial Communication for 16F84A
Hi,
Thanks for your reply. I have figured out that the code is getting written on the PIC, that error is sort of a default, so no harm!!!