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.

Has anyone noticed problems with the PIC16F628A?

Status
Not open for further replies.
Solved!

Even though none of the pullups or downs were on I wondered if there is some resistance present at the output header for the port? I just thought that maybe somewhere in the long route to all the other places that each pin travels, like all the same pins on the other sockets and LEDs etc that there could be something that without my knowledge was helping me out, so I tried the PIC back in my circuit and added a series resistance of 10k in the piezo line and hey presto it works!

Maybe I have a faulty EP5 board? At least now I know that there could be similar issues I can make allowances for them.

Happy at last.....Al
 
Re the piezo I think it's more likely some fussy thing about that piezo itself. I've used a few direct from PIC pins with no problems, both types the DC ones with inbuilt osc and plain piezo element types.

Re the PSU I have attached a quick photo of my home made jobby. The 5v current regulated supply is the left side of the PSU it uses a LM317 for current limiting feeding a 7805 for 5v reg. The switch selects 20mA (also good for LED testing!) and 50mA, 100mA, good for PIC circuit diagnosing.

Teh right hand side of the PSU uses 2 more LM317 regs, a current reg with a rotary switch to set the current and a toggle switch to "add 1 amp" to the rotary selection. That gives a current range from 10mA up to 1400mA, good enough for most stuff including trickle charging batteries.
Then it goes to a LM317 for voltage regulation, with a rotary switch going from 1.6v to 24v.

I said "embarassing" because unlike my other PSUs which have voltmeters/ammeters etc this little box is basically a transformer/rect/cap then nothing but a few 3pin regulators and a heap of resistors soldered all over the rotary switches. And no I'm not going to show the insides it's UGLY in there! ;)
 
Last edited:
Hi Roman,

That does looks very proffesional! Everyone on here seems to have the technology to create custom artwork and labelling, except me! Doh! I usually end up using sticky labels or at best the brother label printer.

I have been having a small family crisis again here. My son is trying to get his bitter ex to allow him and us to see our grandson. It is a complicated affair with his ex causing as much pain as possible to try to make him go back to her. You wouldn't think that she was the one who wanted the relationship to end in the first place!

Anyhow enough of my problems, back to the PSU. I was wondering whether to build or convert?

On the one hand I have a working supply I could easily modify, mine being an 18-0-18 adjustable and static 5v. I have NEVER had occasion to use the negative side of it yet and often thought of doing away with it in favour of making it into a 0 to 36v adjustable supply. I would also retain the 5v as you have on yours.

OR should I go a different way and start with fresh bits to build a supply like yours (how do you do your graphics?) and maybe incorporate an LCD to show V and A, I'm getting quite into LCDs at the moment and have a few different ones. What do you think, pro's and cons?

This could be my next big project so any ideas appreciated.

Al
 
Sorry to hear about the family issues especially when there's little kids involved. :( I hope it all works out ok.

Re the PSU I couldn't have a workshop without a fully adjustable supply and have a few. The one above with fixed voltages is just the one I use for 5v stuff like PICs etc we were talking about.

If you don't have a fully adjustable supply then it will be many times for useful to you then a +/-18v unit. You could rewire it to use the 36v into a LM317 (or two if you want adjustable current limiting, I would choose that if this is your first adjustable supply). It's only a handful of parts; a couple of LM317s, a pot, few resistors and caps etc and some type of switch for the current limiting.

I always put dual meters on adjustable supplies, volts and amps and have a preference for analog moving-coil type meters as I like to watch the ammmeter move in response to load, a nice benefit you don't really get with digital ammeters.

As for the 5v regulator it sounds like you already have that, so for current limiting the 5v rail you just add a LM317 before it with a 3 resistors and a switch like my setup or a rotary switch and as many resistors to suit. Maybe you shoudl start a thread if you plan a nice PSU build? I'm sure lots of people will have suggestions.

Re the front panels, generally in the past I have drawn them on Corel and taken the file to a trophy engraving shop, if it's not a rush job you can negotiate quite low prices to get it engraved on plastic two-colour material. On some jobs I had just laser printed the art onto coloured cardboard and sprayed with clear lacquer (don't use bubbeljet as it runs!) and glued that onto the front panel.
 
Hi Roman,

Sorry I must have been a bit vague about my present PSU. It is -18 0 +18 with both sides being adjustable with a separate pot.

A couple of years ago I added an LED voltmeter to the mix using a MAX7660 ic and made the display switchable to either the neg or pos side.

A couple of niggles with this though, I would have to choose which side to monitor (if I ever used the neg side) and the main one is that the LED draws more current than most of the projects I build. hehehe

So I thought I would maybe do something LCD. I don't have any spare analog meters but I do have some LCDs and in fact I was thinking of utilising one of the Nokia 3110 screens I have (a mate works at a recycling plant and brings me them sometimes) though I have never yet got round to using one. By all accounts they are just simple 48 x 84 matrix serial devices though I still can't find out on the net which is pin 1. Also they show in the datasheet (which does not show the pinout!) that they are a 3.3v device yet many people have designs that seem to be using the 5v supply of PICs and Atmegas? Puzzling!

Anyway I will keep looking for the specs and pinout.

Al
 
Hi HouseOFwax,

Quite right mate, that was a typo and should have said 3310.

Thanks for the link though! Thats handy and confirms which way the display is wired.

On another point, is there any reason I can't use a PIC12F629 to drive the display and power the circuit from 2 x 1.5v cells? It would be well above the minimum voltage for the PIC and should suit the display too. Or does the display actually need more than 3v on some of its pins?

Thanks again, Al
 
Hello Al,
I have no experience of the PIC12F629 that you speak of. Though I have used 3310 / 3330 LCDs with a 16F628 with 2 x AAs and it seems quite happy. I had a thermometer at work recently running on 2 x AA and it lasted for weeks.

Whilst working on the code I was powering it from the Pickit 2 and dropped the voltage to 3V ( just to be on the safe side ) to see how it was going, then disconnecting the display, jacking up the power to 5v and reprogramming again.

If you're interested I'll sort out some 16F628 known working code.

EDIT: That said, I do have experience with the 12F675, I built this http://www.ivica-novakovic.from.hr/Nokia Lcd Termometar.htm
It works very well on 2 x AAs (for ages). :)
 
Last edited:
Hi HouseOfwax,

coincidence or what but that is the very circuit that I have just built to test the display, but from another site in English. Sadly it does not do anything at the moment, maybe a small error or short somewhere.

I would be interested in some 628 code mate. I could then have another try with the display.

By the way if you or anyone else needs a specific phone screen just ask and I will get my mate to find one. They only get scrapped anyway so he doesn't mind putting them to some use and if he can find one I would gladly post them on. They get maybe a few dozen phones thrown away every week and most work, just too old and unstylish for their owners. Some are newer and better than mine but I am not a heavy phone user so I stick with my old but reliable samsung which is only a step up from the cans and string! :)

Al
 
Here you go Al, have a play with this. I didn't write all of it, and have commented on what I could.
Thanks for the offer of LCDs, I'll be sure to let you know if I require any.

As for the thermometer, did you try adjusting the contrast byte? In the enclosed code, it's commented, so you can find it easily.

Have fun :)
 
Hi HouseOFwax,

Thanks for that, I will give it a try now.

I notice you have the phone fascia still attached to yours. I assume you have somehow used the spring connectors on the LCD connector? I couldn't figure how to make those joints work so I just soldered onto the pads. Maybe I killed it with the heat?

If I did kill it with soldering even though I am pretty quick with the iron, I will have to strip another one.

By the way how is your LCD connected to the PIC? You said it was a 628 I think, so I will need to adapt my board.

Please ignore last question. Just saw the info in the ASM file.

Thanks again. Al
 
Last edited:
Hi HouseOFwax,

Success mate, it was the contrast bit!

After a few tries I got mine looking good at F0 instead of A9. Seems none the worse for soldering too!

BTW have you looked at my other current thread on PSU's?

Be sure to have a look and comment please.

Thanks again mate, Al
 
Last edited:
Hi Al,
I'm glad that you are up and running. The code is a bit of a mess, though it works. Have fun, see what you can do.

As for the LCD connections, I soldered wires to the spring contacts, they went to a female connector and I then got the hot glue gun out. I had a slight accident with one of the three that I made. It fell in coffee and didn't work afterwards. (unsurprisingly)

Though, whilst stripping it down I found out that the 'glass' itself had pads on it and some corrosion was between them and the spring contacts. More wire and soldering, that one is back in action too. :)

Best wishes.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top