UART test with pic16f628a

Status
Not open for further replies.

dragonfighter

New Member
Hello all!

I took Lars Petersen's code and tried to program my pic.
The code sends alive message, then echoes characters at 9600 bps.

The code is compiled to hex by MPLAB IDE.
The problem is that some errors appear when I try to program the code using WinPIC or IC-Prog.

I don't think that it is a hardware issue as winpic initializes my pic succesfully and the interface test works.
WinPic Error log


UART TEST CODE


PLEASE HELP!!
 
Last edited:
dragonfighter said:
I don't think that it is a hardware issue as winpic initializes my pic succesfully and the interface test works.

I'm most certain that is a hardware issue. All 67(address 0..0x42) of your data words were not programmed into the PIC.

Do a READ operation and confirm you can read the Device ID of 16F628A, which is "01 0000 011# ####", i.e. 0x106? or 0x107? where # can be 0 or 1 and ?=0-F.

Remember you'll need to pulldown the PGM pin(pin10) even though you are using HV programming.
 
Looks at the following image, if your programmer works then you should also get the device id as I have got.

The problem with serial port programmer is that they might not work and it depends solely on the hardware of the serial port on your PC or Laptop. Serial COM port on very old PC usually works but most laptop COM port won't.

To check, do a READ operation without the PIC and measure voltage across capacitor C1. You should get about 12~13V. If not, then there is no chance for it to work and you have to try those schematic that use separate power supply.
 

Attachments

  • winpic_628a.png
    10 KB · Views: 679
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…