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.

16F628 thermometer

Status
Not open for further replies.

W8TZ

New Member
I have been working on a digital thermometer located at this web site http://www.sixca.com/eng/articles/digittemp/index.html for about 2 months. The hardware circuit is complete. It is a relatively simple circuit so I am pretty sure there are no wiring errors. I originally had trouble programming the 16F628 but have since resolved that problem by using different programming software (WinPic). When the circuit is powered up nothing much happens. The 4mhz oscillator is working and I have 5v and 12v in the proper places but there is no display. I also get a short pulse on the DS1820 DQ line. I have tested the LED readouts and they are working properly. The PIC seems to be doing nothing. I am guessing there is a problem with the program but I have no way of confirming this since I have no programming knowledge. Can someone tell me if this circuit and program should work.

The web site has two circuits, one is a 3 digit thermometer, the other is a thermometer and digital clock combined. The clock/thermometer circuit is wired to the PIC differently than the thermometer only. The strange thing to me is the PIC program for both of these is the same.

I have built several 16F628 projects in the past and so far they have all worked perfectly, that is until now. Any ideas or help appreciated.

:confused:
 
May I ask how you've built your version of the circuit? Printed circuit board or solderless breadboard? Are you using the same 2.3" LED displays and driver ICs?

Mike, K8LH
 
No help with the C code, but you are using the 'clock_temp628' code from the zip file for a template? The '595 code on the linked webpage is incomplete (i.e. no latching, decimal placement, or decoding for the leds taking place).

Make sure the output enable is low, or just ground it.
 
thermometer

I am using the clock_temp628.hex file from the web site.

The thermometer is built using the same parts as described on the web page, 2.3" common anode LEDs, TPIC6B595, DS1820, 4mhz resonator. It is on a
solderable perf board wired point to point. The only thing different on my version is the addition of 12v and 5v regulators to power everything.
 
It will be very difficult to debug your code If you cannot insert delays into the read and writes to the DS1820, and say blink an led for the bits going by. If you are lucky and get a proper read for the output, then you can narrow your search to other parts of the code.

If you don't have the CCS C compiler then maybe you can save your project by finding another substitute language/compiler that has the required one-wire and '595 to 7seg librarys or subroutines?
 
Ok, it sounds like you pretty much copied the project and you're lookin' for a hex file that works with that hardware design.

Let me see what I can come up with.

I don't have that particular C compiler but I've got TPIC6B595's and other parts that I can throw onto a solderless bread board and I've written PIC assembler code for the DS18B20 before so hang in there and I'll cobble something together to test.

Vy 73, Mike - K8LH
 
I've encountered EXACTLY the same issue with this project.

I'm using a 16F628A instead of a 628 but it animates correctly on Proteus.

I've slowly re-built the circuit in Proteus and so far it indicates its supposed to work.

I dont have a spice sim for the TPIC6B595N chip.. If I could find one , I can confirm the whole thing digitally.

One thing I did find was the B4 circuitry, 1K to BC557 to 2 LED's to a final 1K resistor would not fire animate.. I removed the 12V source, BC557 and one of the 1K resistors leaving it connected to Pin10 (B4), this now animates as working.

I did notice it takes the hex file almost 40 seconds to collect the data from the1820 and 1307 before anything happens.

If anyone has a Proteus compatible spice model for a TPIC6B595 chip PLEASE, PLEASE let me know.

Cheers
Steve
 
clock/thermometer

Hi.... I built the clock/thermometer from sixca.com and it works OK...I used 628 and programed with Win Pic these thermometer does not displey negative temp. look at your artwork.....
george
 
Candyman561,

Your right , I was referring to the Digital Temp and Clock on the same site
http://www.sixca.com/eng/articles/clock/clock.gif

Which appears to use the same source code, maybe you can clarify that as you completed it.. For the Clock/Thermometer, which of the two .c files did you use? or did you use the single .hex file instead?

Did you do anything different with the code?

Any changes in the parts for your version?

The circuit diagram clearly shows the BC557 as an NpN symbol, which it is not. Its a PnP component, which makes the Emitter arrow point in, not out.

My last post actually became a "double negative" by both changing the symbol to the correct one AS WELL as inverting the C/E pins..

Correct the Symbol only, and the C/E pins work as currently placed.

Regards
Steve
 
Hi Stevey ....I copy the hex file and I program thePIC and it works OK for the first time...BC557 is a pnp ......for the last 2 digits you have to rotate 180 grade the disley and to conect ..... segment a=d : b=e "c=f :d=a :e=b :f=c and g=g conect d to pin6 on595 e to pin 7 f to pin14 a to pin16 b to pin17 c to pin 5 and g to pin4 and should be OK ....IF one of you can help me with the project clock/thermometer... the thermometer does not displey negative temperatures when DS18s20 is at 0 c the PIC stop working... I am new in CCS programing
Thanks George my email : g_onsen@yahoo.com
 
After much twiddling and tweaking, I’ve managed to get the Sixca code to work! Not all the digits are displaying properly. I suspect Candyman561 is correct on the two right digits and they require inverting on the display to work. I’ll test that tomorrow.

EVERY fuse setting except XT must be OFF when writing the chip

Both 5Vdc and 12vdc must be triggered on at exactly the same time to get the init going, A “DPST” (Double Polarity, Single Throw) switch took care of that. You may want to try just a slider switch with both grounds tied to it, leading to a single ground point if you dont know what a DPST is.

As well, I placed a diode at the 12Vdc grounding point to prevent voltage leakage from the 12V side, This might have caused RB4 to “Pull-UP” and block the init.

DOT lines pin pin 6 of the 595's I replaced the 220ohm resistor with a 1K to stop burning holes in my eyes with those bright dots. I'll replace it with the correct value once I do the math.


Many thanks to those that assisted. Especially Mike, K8LH who has suffered my numerous emails.

Now its time to hack the code into something I want.. =)

My next step is to have a dual display, 8 digits total with but one set displaying a different time zone.

Hope this helps someone else.
 
Steve,

Congrats'.

Do the particular displays you're using actually require 12 volts? Can they be connected to 5 volts (using smaller value segment current limiting resistors)?
 
Yes, the led segments are actually an individual series of 5 led's.

So the drive voltage is 11V with 100mA draw, which is the reason for the TPIC6B595. It can handle that and a bit more.


Cheers
Steve
 
Not monster led's, rather a series of 5 led's end to end.

each led is 2.2volt at 20mA draw so you x5 for the number of led's, 2.2x5=11volts and 20mA x5 = 100mA draw

If you place them in parallel instead you can retain the 2.2v (so a 5v source will work) BUT the total mA draw per channel remains 20mA x5 = 100mA

Either way you need a TPIC6B595n or other like a 2803 , Darrlington Array, Buck or Non-Inverting CMOS buffer to handle the extra mA draw on each channel and/or handle the 12V power.
 
Last edited:
Hi Steve,

You're correct in that when they're wired in parallel they'll use 2.2v at 100 ma but I think you'll find that when wired in series they'll use 11v at 20 ma.

Ok on your plans to go to eight digits. If you ever want to consider multiplexing the displays let me and the Forum know and we'd be happy to help. I attached a couple 8 digit hardware examples that'll work with your 12 volt display voltage. Plenty of other ways to do it too.

Have fun. Regards, Mike
 

Attachments

  • Sixca Mux 1 small.PNG
    Sixca Mux 1 small.PNG
    119.6 KB · Views: 595
  • Sixca Mux 2 small.PNG
    Sixca Mux 2 small.PNG
    88 KB · Views: 681
clock/thermometer

Hi.. Steavey...if you have time to dig into the program of Sixca project and to figure out how to change the program to displey negative temp. I am interested in it Please let me know
thanks George
 
clock/thermometer

Hi Stevey If you have time to dig into the program of clock/therm. from Sixca and to figure it up how to change the cods to displey negativ temp. I would like to know how to do it .I just start with PIC prog. and I am not an expert yet.
Thanks George
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top