progamming pic 16F628A

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
greenant
Posts: 10
Joined: Mon Sep 18, 2017 8:35 pm
Has thanked: 3 times
Contact:

progamming pic 16F628A

Post by greenant »

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.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: progamming pic 16F628A

Post by medelec35 »

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?
Martin

greenant
Posts: 10
Joined: Mon Sep 18, 2017 8:35 pm
Has thanked: 3 times
Contact:

Re: progamming pic 16F628A

Post by greenant »

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.
Attachments
autm vijlen nieuw.fcfx
(18.61 KiB) Downloaded 234 times

User avatar
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

Post by Benj »

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.

greenant
Posts: 10
Joined: Mon Sep 18, 2017 8:35 pm
Has thanked: 3 times
Contact:

Re: progamming pic 16F628A

Post by greenant »

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.

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: progamming pic 16F628A

Post by QMESAR »

I am testing the chip while it is in the programmer, according to the datasheet there is a 10k resister in the MCLR line.
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 line :shock:
Can you post this datasheet please for us to learn from it also !

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: progamming pic 16F628A

Post by medelec35 »

QMESAR wrote: I never saw a programmer or a pic with a pullup in the MCLR line
This is a practice I have seen often as MCLR and VPP can share the same pins.
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

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: progamming pic 16F628A

Post by QMESAR »

@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 :D

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.
:D

greenant
Posts: 10
Joined: Mon Sep 18, 2017 8:35 pm
Has thanked: 3 times
Contact:

Re: progamming pic 16F628A

Post by greenant »

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.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: progamming pic 16F628A

Post by medelec35 »

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
Martin

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: progamming pic 16F628A

Post by medelec35 »

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?
Martin

greenant
Posts: 10
Joined: Mon Sep 18, 2017 8:35 pm
Has thanked: 3 times
Contact:

Re: progamming pic 16F628A

Post by greenant »

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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: progamming pic 16F628A

Post by medelec35 »

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
Martin

greenant
Posts: 10
Joined: Mon Sep 18, 2017 8:35 pm
Has thanked: 3 times
Contact:

Re: progamming pic 16F628A

Post by greenant »

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.

Post Reply