progamming pic 16F628A
Moderator: Benj
progamming pic 16F628A
Hello,
I am using Flowcode 6 pro. in which I have written a progam which when I simulate it runs fine, however if download the program into the chip
(pic16F628A) it doesn"t work. I using EB006-7 programmer. What can I be Doing wrong.
I am using Flowcode 6 pro. in which I have written a progam which when I simulate it runs fine, however if download the program into the chip
(pic16F628A) it doesn"t work. I using EB006-7 programmer. What can I be Doing wrong.
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: progamming pic 16F628A
Hi greenant, It's probably your configuration settings?
You have not given us any information to help.
Can you post a flowchart and let us know if using a crystal or internal oscillator?
Do you get any error messages or do you get compiled successfully message?
You have not given us any information to help.
Can you post a flowchart and let us know if using a crystal or internal oscillator?
Do you get any error messages or do you get compiled successfully message?
Martin
Re: progamming pic 16F628A
Hello medelec, I attached the flowchart,I am running the chip on internal osc.I didn't get any error massages it compiled succesfully. I got in the msg.file a warning that the macro mightnever been called. I ignored this because the simulation was working correct.
I hope you will be able to help me. regards greenant.
I hope you will be able to help me. regards greenant.
- Attachments
-
- autm vijlen nieuw.fcfx
- (18.61 KiB) Downloaded 274 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: progamming pic 16F628A
Hello,
Are you pulling the MCLR pin up to VCC via say a 10K - 100K resistor? Your config and clock speed otherwise look fine to me.
Are you pulling the MCLR pin up to VCC via say a 10K - 100K resistor? Your config and clock speed otherwise look fine to me.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: progamming pic 16F628A
Hi Benj
I am testing the chip while it is in the programmer, according to the datasheet there is a 10k resister in the MCLR line.
I am testing the chip while it is in the programmer, according to the datasheet there is a 10k resister in the MCLR line.
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: progamming pic 16F628A
This is very interesting in 12 years(I am working with PIC's) I never saw a programmer or a pic with a pullup in the MCLR lineI am testing the chip while it is in the programmer, according to the datasheet there is a 10k resister in the MCLR line.

Can you post this datasheet please for us to learn from it also !
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: progamming pic 16F628A
This is a practice I have seen often as MCLR and VPP can share the same pins.QMESAR wrote: I never saw a programmer or a pic with a pullup in the MCLR line
You can't tie MCLR/VPP directly to 5V, yet you may want to use MCLR to reset if adding a reset switch.
Or if MCLR/VPP is also an input then you may want a pull up resistor.
@greenant is the 10K resistor in series with programmer VPP and MCLR or is the resistor going from MCLR of chip to +5V?
As mentioned recently:
What I always do before developing any new project is to set up a 1 second flash test.
Once the timing is correct, I start to develop my project.
Martin
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: progamming pic 16F628A
@Martin
I agree 100% with you however I understood the OP post as the programmer has the Resistor fitted to the Programmer HW as standard equipment
and that is rareto me , I never saw that .(Normally you have to add the Pullup on your HW (example PICkit2/3 pinout)
The reason I am asking for his datasheet to see what programmer it is
I took it that he says from the datasheet of the programmer has a resistor already in line
here the OP copmment
I agree 100% with you however I understood the OP post as the programmer has the Resistor fitted to the Programmer HW as standard equipment
and that is rareto me , I never saw that .(Normally you have to add the Pullup on your HW (example PICkit2/3 pinout)
The reason I am asking for his datasheet to see what programmer it is

I took it that he says from the datasheet of the programmer has a resistor already in line
here the OP copmment
I am testing the chip while it is in the programmer, according to the datasheet there is a 10k resister in the MCLR line.

https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
Re: progamming pic 16F628A
Hi QMESAR'
I looked at the datasheet EB006-7 again and I see I made a mistake I was looking at the MCLRA and MCLRB multiplexing.
The reset pushbutton is connected to ground. I measered on pin A5 5VDC where that is coming from I cannot find on the datasheet.
As medelec suggested that I have to test the delay first I don't understand there the only delay I am using is in the macro (teller7P) and I don't
care if the delay is exactly 200ms or does that influence mij program.
I looked at the datasheet EB006-7 again and I see I made a mistake I was looking at the MCLRA and MCLRB multiplexing.
The reset pushbutton is connected to ground. I measered on pin A5 5VDC where that is coming from I cannot find on the datasheet.
As medelec suggested that I have to test the delay first I don't understand there the only delay I am using is in the macro (teller7P) and I don't
care if the delay is exactly 200ms or does that influence mij program.
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: progamming pic 16F628A
Hi geenant,
The only reason for the test is to establish tat the hardware is running at the correct speed.
For example if you set the delay so after each second the LED changes state then if on the hardware LED changes faster or slower or not at all then you have an issue with the hardware running at the correct speed.
Once hardware is running at the correct speed, you can procedure to create your own flowchart.
Martin
The only reason for the test is to establish tat the hardware is running at the correct speed.
For example if you set the delay so after each second the LED changes state then if on the hardware LED changes faster or slower or not at all then you have an issue with the hardware running at the correct speed.
Once hardware is running at the correct speed, you can procedure to create your own flowchart.
Martin
Martin
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: progamming pic 16F628A
Hi greenant
I have not got your target device so changed target to 16F1937 and it works ok for me.
You have not said what does not work.
Is it that LCD is not showing anything?
I have not got your target device so changed target to 16F1937 and it works ok for me.
You have not said what does not work.
Is it that LCD is not showing anything?
Martin
Re: progamming pic 16F628A
Hi meledec,
I also changed target to 16F877A and now everything is working. With the 16F628A I think the problem is that the I/O on port A are analogue,
however as soon as you address portA as I/O Flowcode automatically sets port A to I/O, I set the jumpers J18 and J19 to A6+A7 on EEB-006-7.
After downloading the program to the chip nothing is working, when I make A3 High A4 should become High too but it don't and when that is not working the rest of the program isn't also.What I do wrong I do not know maybe you know.
regards Rudolf
I also changed target to 16F877A and now everything is working. With the 16F628A I think the problem is that the I/O on port A are analogue,
however as soon as you address portA as I/O Flowcode automatically sets port A to I/O, I set the jumpers J18 and J19 to A6+A7 on EEB-006-7.
After downloading the program to the chip nothing is working, when I make A3 High A4 should become High too but it don't and when that is not working the rest of the program isn't also.What I do wrong I do not know maybe you know.
regards Rudolf
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: progamming pic 16F628A
Hi Rudolf,
I have tried on a simulator which uses hex file and the 16F628A is working..
PortA is definitely set on digital.
Do you have another 16F628A you could try?
What I would do is to read the switches on port A and pass the value to port B just to test if they can be read from and written to.
It only takes a few icons within a loop.
I assume the 1 sec flash test was ok?
Martin
I have tried on a simulator which uses hex file and the 16F628A is working..
PortA is definitely set on digital.
Do you have another 16F628A you could try?
What I would do is to read the switches on port A and pass the value to port B just to test if they can be read from and written to.
It only takes a few icons within a loop.
I assume the 1 sec flash test was ok?
Martin
Martin
Re: progamming pic 16F628A
Hi Martin
I don't have another 16F628A so I think I will go on with the 16F877A and because I want to extent the program with some more features which is
easy with the 16F877A because it has more I/O.
Anyhow thank you for your help, Rudolf.
I don't have another 16F628A so I think I will go on with the 16F877A and because I want to extent the program with some more features which is
easy with the 16F877A because it has more I/O.
Anyhow thank you for your help, Rudolf.