PIC programming project

Status
Not open for further replies.

Wishmaster

New Member
HI all..

Im doing a final year project for my school which involves PIC programming. im using PIC16F628 microcontroller.

Part of my project involves code scanning and checking..
im using the serial USART to recieve the code but im stuck at how to cross-check the recieved code with the one stored in the PIC..

If anyone could help me out with any solutions or suggestions, I wud be very greatful..
thanx.
 
Well. I would just take advantage of the SUBWF command. Load your 8bit snipet into W and subtract from the [file] that has the correct and appropriate 8bit snipet. If they are the same then the Z flag should set.

ex:

repeat
bcf status,Z
movf sample,w
subwf actual,w
btfss status,Z
goto repeat

Assuming you are programming in Assembly.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…