Help with Pump Overrun Timer Please

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

Moderator: Benj

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Martin,

I am trying to program the chips that came and it keeps saying invalid device detected, the chips are pic16f1824-i/p but it is just pic16f1824 in Flowcode, do you think I need a different chip file ?

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

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: Help with Pump Overrun Timer Please

Post by medelec35 »

Sounds to me like chip is not being read correctly.
E.g no power, wrong connections, connections open or short circuit, or if ICSP then ICSP connections have components connected to them that's interfering with programming signals.
E.g pots, capacitors etc
How are you programming target device?
when I build circuits, i connect 2.54mm header to VPP, +5V, 0V ICSPCLK and ICSPDAT.
Plug in programmer, program, then remove programmer.
so much easier than removing chip, program chip then re-insert chip.

Martin
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Martin,

I have put it on a little breadboard with 5v power supply to vdd pin1 and vss pin14, then I have MCLR pin4 connected with a 4.7k resistor to vdd, then I have pgd and pgc connected to pins 12 and 13 , I turn on the power supply and try to program to chip.

Thanks
Stuart

edit

I was thinking of using an icsp header but microsoft recommend using disconnection devices on 3 of the connections, not sure how to do that
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by Steve001 »

is this what you trying to do ?

http://www.matrixtsl.com/mmforums/viewt ... f=7&t=8718

** This was originally for a PIC16F877A so the pins may vary **

Please see ben's comments at bottom of post

Steve
Last edited by Steve001 on Thu Mar 26, 2015 10:15 pm, edited 1 time in total.
Success always occurs in private and failure in full view.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Steve,

so I think Ben is saying don't bother with low voltage programming , but how do you have in circuit high voltage programming ?

cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

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: Help with Pump Overrun Timer Please

Post by medelec35 »

Hi Stuart,
High voltage programming (can be known as dual voltage programming), is when you use VPP pin and the voltage is higher than VDD.
PICKkit2 guide shows it well:
ICSP.png
(33.96 KiB) Downloaded 7258 times
You must make sure programmer can reduce VPP from standard 13V down to 9V for the newer chips.
E.g. 16F18xx series.
If not what I do is add a 10K resistor in VPP line in series with programmer and target device.

Martin
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Martin,

Thanks for the info, I will have a go at that in my next project, still can't get this chip filled up though....?

Cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

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: Help with Pump Overrun Timer Please

Post by medelec35 »

what programmer are you using?
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Martin,

I am using a Pickit3.....

cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

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: Help with Pump Overrun Timer Please

Post by medelec35 »

acestu wrote:then I have pgd and pgc connected to pins 12 and 13
Its the other way around
12 = clock
13 = data

Also just for programming side, 4K7 is not required.
You can just connect VPP of programmer to VPP of target device even if MCLR within config settings has MCLR set to external
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Martin,

I started again with a different breadboard and it worked, I am going to try the board with chip in it later, just need to pop out first.

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Martin,

I built a temp setup on a piece of plywood with a batten holder and bulb to simulate the pump, and a light switch to supply the pump call, when I plugged it in the lamp lit immediately and the backlight of the lcd lit up but no text, I tried switching the pump call but nothing happened, I will have to start testing tomorrow. :cry:


Thanks
Stuart

p.s.

How long can the I2c Lcd leads be ?
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by Steve001 »

Hi Stuart

Have seen i2c at 50 Mtrs on a diesel generator :shock:

this may be of help

http://www.nxp.com/documents/applicatio ... N10658.pdf

a good twisted core screen cable is a must tho at that length

When i ran a project with a long display cable ( a standard lcd display) i found running cat 6 cables and beefing up the zero volt tracks helped a lot , i also had to increase the time delay after the screen start to allow the screen to initialise correctly

Steve
Success always occurs in private and failure in full view.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Steve,

Nothing that drastic, I have it connected the screen to the pcb using singles at a distance of about 8 inches, I will have to start troubleshooting now with my meter.

cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by Steve001 »

try twisting your sda and sdl together and or using some cat 5e cable or cat 6 if you have some
Attachments
TWISTED CABLES.jpg
TWISTED CABLES.jpg (14.08 KiB) Viewed 12411 times
Success always occurs in private and failure in full view.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Steve,

Yes I have done that but no difference, I am trying to get the parts together now to make a second one on a breadboard (which I should of done first), I was just a bit excited I think getting a pcb done for the first time, my idea was to put my phone number on them and if they didn't work they make excellent gadget business cards, great learning curve, not only was the pcb relay footprint larger, its No & Nc were swapped hence the light on straight away.

Cheers
Stuart

p.s. I don't have a delay after lcd initialize , do you think I need one ?
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by Steve001 »

Hi Stuart,

Now you have said that i would build your lcd display circuit on a bread board and try it. Just to make sure that you have the correct connections and all is working as it should be

I personally put a delay after the lcd start up for between 250 & 500 Msec then do a clear screen

Steve
Success always occurs in private and failure in full view.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Steve,

I am beggining to think that my pickit3 is US, because I am getting all sorts of weird messages like the one below, what do yo use for programming ? , I have K150 somewhere and a Matrix one, m
think I will dig them out.

cheers
Stuart
pickit_error.jpg
pickit_error.jpg (32.25 KiB) Viewed 12385 times
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

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: Help with Pump Overrun Timer Please

Post by medelec35 »

still sounds like a comms issue to me.
Have you removed 4k7 from VPP to +5V?
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Martin,

I have another chip setup on a breadboard now, I have tried programming several times removing all connections and resistors, all that is connected is crystal on pins 2 & 3 and the crystal caps so I am doubting the programmer now....

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

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: Help with Pump Overrun Timer Please

Post by medelec35 »

Can you post a full circuit diagram and I will see if I can spot what could be causing the issue?
It maybe programmer but could be worth looking into.
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Thanks Martin,

Will post it shortly.

cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Ok


pickit3 ------ chip pic16f1824

pin1 to MCLR/vpp pin4

pin2 to vdd pin1

pin3 to vss pin14

pin4 to pgd pin 13

pin5 to pgc pin 12



thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi,

The only other connections were power and ground to the breadboard power supply, I have just removed them and it says that programming was successful ?


thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

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: Help with Pump Overrun Timer Please

Post by medelec35 »

Do you have anything else connected to those pins, or it is still stand alone?
What about trying to program with MPLAB instead of flowcode and see if it makes any difference?
Martin

Post Reply