Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to Program the PIC16f57

Status
Not open for further replies.

jwflammer

New Member
I have a Sure Electronics Demo board for dot-matrix LED 6416&6432 and it has a PIC16f57 i want to reprogram it to change the displayed information to have it say what i want it to the board has 6 pins to work with NC, PGC, PGD, GND, +5V, and MCLR how do i use these pins to program the chip i'm thinking i should use hyper terminal for Linux to program it and build a make shift com1 cable connector but im lost can any one point me in the right direction.


thanks John
 
Last edited:
I realise that punctuation is optional now, but being over 30 I found your posting very hard to read. Is it possible to use a full stop (at least) in the future?

OK, those pins relate to the 'in circuit serial programming" (ICSP) capability of the PIC. You can use any PIC programmer that conforms to the "standard" to reprogram the chip. You can read up about this capability in the datasheet.

In general, I would recommend using the PICKIT 2 or PICKIT 3 programmers (these are available from Microchip and there are a number of "clones" available - I bought mine from AU Electronics). There are a number of "bit banging" circuits around on the Internet if you want to build one from scratch.

Which way you go really depends on how often you want to reprogram this particular chip, if there are others that you want to program in the future, how much you want to spend and how much you want to risk destroying the chip with your own circuit.

Susan
 
Well what i want is less risk, its for school and it can not be a risky programming process. It has to be easy for some one with less technical knowledge to be able to do. I.E. my self

thanks

the data sheet for the sure electronics board dose not specify how or what, so im lost i have an old BK 864 Universal Device Programmer at my disposal, will that work??
 
Last edited:
For a start, according to the device list for this programmer at https://www.electro-tech-online.com/custompdfs/2010/05/864_devicelist.pdf, the PIC16F57 is not one of the devices it can reprogram. Also. looking at the pictures of this programmer, you would have to take the chip off the board to place it into the programmer. I trust it has been socketed on the board!

However, if the board has a 6 pin plug on it with the labels you mentioned in your original posting, then you should be able to program it while it is still in place (that's the "In Circuit" part of the ICSP name). The programmer has a 6 pin cable on it that will connect directly into the plug on the board. The programmer then connects to your computer and the software in that will communicate with the programmer and upload the binary file to the PIC device.

I would suggest that you either spend the $40 odd dollars for a PICKIT programmer (don't quote me on the prices - I doubt if we are even in the same country!) or, as you are a school, you might be able to persuade a nearby University or commercial outfit to let you use one of theirs.

Having said all that, I have an uneasy feeling about what you are trying to do. Do you have the source of the program that is currently in the PIC device? What programs are you using to edit and compile the source? Are you able to simulate/test your program changes before you upload them into the chip, or are you planning on using the debugger capabilities of the programmer to fix any problems you encounter?

If you are using the free software from Microchip, then it should be able to connect to and communicate with the PICKIT programmer/debugger without a problem. If you are using something else, then you will need to make sure that it operates correctly with whatever programmer you are able to get access to.

Also, if you are needing to do any debugging by interacting with the programmed board itself, then you may need something other than a bit-banging programmer as they tend to only perform the programming function.

Susan
 
thanks for all the good info, yes i have the original program, it was with the data sheet, and this is what i bought from sure electronics **broken link removed** it came with that board and i want to reprogram it to display what i want instead of the default test of led matrix code. i currently have no program to compile and edit the code. i am how ever using Dev++ for my C code, I'm also ok with programing the Arduino boards but, i have had no luck getting the 6432 LED matrix working with the Arduino.

thanks J.
 
Last edited:
I'm a little confused here. I've looked at the web site you reference, and at the only PDF file that can be downloaded (so it might not be the one you can see). It seems to me that the board itself is designed to have characters fed to it using the 16 pin plug. If so, then you should be able to rig up a simple interface from a PC via a serial or parallel port and transfer the programming to the PC using whatever language you are most comfortable with.

Is the program that is included in section 3.4 the source code that you are referring to? I'm not clear where that fits in as the schematic provided for the boards (and hence the comment above about the 16 pin connector) seems to talk directly with a set of 74HC series ICs and I can't see a PIC device anywhere. I assume that it comes as a separate device that connects to the LED display board. The code looks like C but I'm not familiar with the PIC16F series of development tools. (In the PIC18F world where I have most of my knowledge, there are 2 compilers that use a slightly different way of doing things and I'm not sure if the code is transferable - you had better check if the same is true of the PIC16 world).

I would recommend that you download the software development tools from the Microchip site - at least that way you know that they are compatible with the controller and you can also get a lot of help from this forum and from the various forums on the Microchip site as well. You can also use the simulator software to check that the program you write will work as you expect without any additional hardware.

Of course, you will still be left with the issue of actually programming the PIC chip itself but my previous comments probably apply there.

Susan
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top