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.

Pic help

Status
Not open for further replies.

wijnendael

New Member
I have a circuit that drives leds from a reference signal, the circuit does not function correctly and the company that supplied it are not now available. I have opened the unit to establish what is used in the circuit, and has somebody told me in a previous posting it is using a 16F88 ic. Now my question is - first is there anyway that i can read the program file from the ic while it is soldered on to the pcb (it is a surface mount ic) secondly i wish to have a go at pic programming / development myself and would like some suggestions on the best development / programming equipment needed. I have looked only on ebay under pic development and there are plenty of kits available from china at reasonable prices can someone give me some suggestions on what to buy, i will be a novice to all this at first but should pick it up pretty quickly (hopefully) as i already program a lot in basic and have a broad knowledge of electronics so something that will be ok for starters but also suitable for more advanced use later would be better i think. Wish to get started as quickly as possible so all suggestions will be looked into
 
Hi there,
I don't have much experience with MCUs but as far as I know there is no way to read the PIC you mentioned in your post, the In Circuit Serial Programming may do that task but for that you will need spacial sockets (if they exists) so that you can read from a surface mount IC. For getting started I think the PICkit2 is best it pays every single penny you spend on it. Look for it on www.microchip.com.To start with PIC programming Nigel's site is the best (www.winpicprog.co.uk ) but if you find this difficult then first have look at this **broken link removed**, I also have bought the low pin count demo board with the PICkit2, it is very useful for beginner. Hope this will help
 
I recommend that you get yourself a PicKit2 programmer, either a genuine one from Microchip or a clone from Sure Electronics (either google em or get them on fleabay)

Both come with a small demo board that allows you to play with some of the chip features.

A great alternative would be one of Bill's excellent Junebugs, it's a combined programmer and development platform that has loads of features to play with, have a look at blueroom electronics for his other kits etc.

rgds
 
is there anyway that i can read the program file from the ic while it is soldered on to the pcb (it is a surface mount ic)

For connecting to the surface mount chip see the fifth posting down in this thread:

https://www.electro-tech-online.com/threads/pic-10f-programming-question.42739/

However if the company you got the product from has used the code protect feature, you will not be able to read the chip. Is this a commercial product? If it is code protected, you could observe what happens, and reverse engineer, however there is a 'long learn' ahead before you get to that point. :)

c36041254's suggestion for a PICkit2 is a good one, however, you may want to look up Blueroom electronics clone.

Here is where the Junebug (PICkit2) is sold:
**broken link removed**
 
Last edited:
If you can describe the function of the circuit a little more then we may get a better idea of what might be possible. A picture of the board (both sides) would also be useful.

Even if the function of the board is fairly simple you will have a very steep learning curve. However, there are plenty of posters here that will guide you in the right direction.

Mike.
 
Thanks for all the replies i will look into the kit recommended. I will try to explain the circuit but first i can tell you that i purchased the unit (rudder indicator for my boat) from acompany called Smartrac inc in the States. I only came to install on my boat a few weeks ago when i had lots of problems installing and setting up. When i try to re-visit their website for assistance i am it does not exist (hence my problem). The unit comprises of a display unit and a sender (10K potentiometer string operated) the setup procedure says that first set rudder to mid position and then while holding the program button in turn on the power and then release, this lights the centre yellow led. press and release ago this sets the centre position, then move rudder to full starboard position and press and release program button (all red leds (5) light) and starboard is set. then move rudder fully to port position press and release program button (all red leds (5) light) port is now set. I have tried all ways to get this unit to program to work but with no success. I will try to post a couple of pictures of the pcb etc if somebody can tell me how to do this.
 
photos of pcb
**broken link removed**
**broken link removed**
**broken link removed**
**broken link removed**

Hope this works !!
 
hi,
The first thing I would do is clean off all those solder splashes also check the joints and the copper links that have been added.

The assembly is messy.
 
the setup procedure says that first set rudder to mid position and then while holding the program button in turn on the power and then release, this lights the centre yellow led. press and release ago this sets the centre position, then move rudder to full starboard position and press and release program button (all red leds (5) light) and starboard is set. then move rudder fully to port position press and release program button (all red leds (5) light) port is now set. I have tried all ways to get this unit to program to work but with no success.
So what does the unit DO when you try the setup procedure above?
 
I think if there is any kind of critical timing involved here, I would be removing that regulator as it's dropping ~7v or more all over the top of that there PIC and directly heating it. Now that really can't be a good thing...
Either find a better one, or at least move it out of harms way.

Clean up the board properly, as stated earlier, it's a mess.
Check all your joints are sound and short free.
Check your power supply is correct pre and post regulator, I'm assuming it's a 5v reg, so you should see at least 4.95v on it's output, if not investigate why.
If that proves fruitless, check that the oscillator is running, those pesky little cylindrical crystals can be a pain sometimes.
Check any reset circuitry is correctly operating and that the PIC is not being held in the reset state.
if all appears as it should, check other things like capacitors fitted properly, especially the polarity concious ones, check resistors for open or high resistance, track continuity etc.

hope this helps
rgds
 
Hi, thanks for all your suggestions. I will check the board sometime today and post the results. As far as what happens at the moment when i try to set up the unit, firstly when trying to set the centre point of the indicator (midships) i cannot get the centre led (yellow) to come on if the potentiometer is moved to the centre position, it will only set if the pot is left at one end. The red leds (port) are flashing dimly and the green leds (starboard) are all on or all off when the pot is moved. The correct function with the red and green leds should be that they illuminate one after the other as the pot is moved from the centre position to one side or the other.
I also have one last question for all you pic users, is there a pic simulator available that allows you to run/test programs without burning them to the pic. Maybe this is a stupid question but i use simulators for other types of programming like plc's etc.
 
The symptoms suggest a loose connection somewhere on the board. I'd try cleaning and re-soldering any suspicious looking joints.

MPLAB (free from Microchip) contains a simulator.

Mike.
 
hi,
Also a trial version of the Oshonsoft sim is available from www.oshonsoft.com

The general consensus is the pcb's need reworking, check the joints, solder bridges, wiring joints.

Have you done a quick check on the pot, either resistive or measuring the wiper output voltage.?

Thinking about the actual program, it sounds fairly simple in what its doing.
Analog voltage measurement and driving LED's, should be easy to build your own.:)

EDIT: check the RED boxed areas.
 

Attachments

  • DSCF0411.jpg
    DSCF0411.jpg
    199.3 KB · Views: 161
Last edited:
Hi, ERICGIBBS thanks for the info, just found the simulator you mention on the net and downloaded.
I did do some tests when i first opened the unit on the regulator voltage etc and checked the pot which seemed ok but will now go through the board in more detail under a glass so i can see everything better.
I agree and that the operation of this unit should be pretty straightforward as it is very simple to do with a plc and also write in basic. I want to re-write (and build ) the indicator slightly different to the one i bought that is why i want to learn more about pic's and there uses.
 
Hi, ERICGIBBS thanks for the info, just found the simulator you mention on the net and downloaded.
I did do some tests when i first opened the unit on the regulator voltage etc and checked the pot which seemed ok but will now go through the board in more detail under a glass so i can see everything better.
I agree and that the operation of this unit should be pretty straightforward as it is very simple to do with a plc and also write in basic. I want to re-write (and build ) the indicator slightly different to the one i bought that is why i want to learn more about pic's and there uses.

hi,
Some of the Left/Right indicators I have seen have linear LED displays, IMO they are easier to read.
Whats the type of boat.?:)
 
Hi our boat is a 9.5 meter cabin cruiser but as it has had lots of mods made over the years i am unsure who the actual manufacturer was. I have a analog rudder dial indicator also that simply uses a 10K pot attached to the rudder that gives me the meter deflection through a simple PD circuit. If you have any more information on what you suggest i will look into it.
 
Hi our boat is a 9.5 meter cabin cruiser but as it has had lots of mods made over the years i am unsure who the actual manufacturer was. I have a analog rudder dial indicator also that simply uses a 10K pot attached to the rudder that gives me the meter deflection through a simple PD circuit. If you have any more information on what you suggest i will look into it.

hi,
Sounds as though its a wheel rather than a tiller.?
If the existing pot indicator is working OK, you could use that pot to drive a PIC's adc inputs, just scale the voltage to suit.

Use a amber/orange LED for rudder amidships and a Green bargraph for Starboard, Red for Port.
That depends upon whether you want rudder angle or heading indication.

You may find at night a dimmer will be useful.
 
Last edited:
Hi again, did make a circuit using led bargraphs and LM3914 ic's that also works perfectly but requires presets to set up the system and after looking into the pic version it looks like it will be a lot simpler to setup, so will have a go at making pic version before i make a decision on which to re-install. Going of your logo i would assume you are from Wales so probably in a boating community.
 
Hi again, did make a circuit using led bargraphs and LM3914 ic's that also works perfectly but requires presets to set up the system and after looking into the pic version it looks like it will be a lot simpler to setup, so will have a go at making pic version before i make a decision on which to re-install. Going of your logo i would assume you are from Wales so probably in a boating community.


hi,
The flag of Wales is a RED dragon an a White background.

Its an old English battle flag, WHITE dragon on Red background.

I am from Portsmouth which is a boating community.:)

Where are you located.?
 
located in Oudenaarde Belgium for last 11 years, but originally from near Manchester. Didn't look at the dragon correctly my mistake !!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top