dalmation said:Wow- thats a lot of work you've put in. I cant say I understand the programming, but I noticed that on the segment table, there is no A-F?
I got myself a book on PIC programming and I look forward to having a better understanding- I really appreciate your help in the mean time.
-Dalmation.
ericgibbs said:hi,
Look at my version of the program, I did add the 'A,b,c,d,E,F' patterns.
**broken link removed**
You can change to 'HELP?' and many others to suit your project.
matseng said:By adding some resistors it's possible to control four displays on each 16F628.
matseng said:This is true if the circuit driving this display unit are capable of both sourcing and sinking the signal (i.e. not open collector) and can handle an extra load of 100 uA.
matseng said:The '628 will first set the pins as input, read the incoming signal, calculate the correct bitpattern, set the ports as outputs, output the bitpattern, wait 20 mS and repeat all over again.
matseng said:This means that the segments on the display can only be changed 50 times per second, but i think that's enough...
hi mats,matseng said:I'm sorry. I have to take back my idea since I just realized that it's not possible to use the RA5 -port as an output as it is crippled on most of the PICs and can only be used as an input.
This input/output sharing thing can be used in other applications to reduce the number of ports required, but for this specific application it's not usable.
matseng said:Eric, you have a point there, I forgot about the transistor there, but by using transistors with a decently high gain it will work even there.
What's the problem with the inputs connected to the anodes? I can't think of anything.
I actually whipped up a test of this on my breadboard now. On the ports connected to the anodes it worked beautifully even with a 100K resistor as isolation to the controlling circuit. And by using BC547B transistors, a 22K as the first base resistor, and a 2.2K as the second it registered by input through a 2.2 K from the controlling circuit.
So the load of the controlling circuits highest bit will be considerably higher (2.3 mA) , but still within a normal range for most ic's.
However, all of this is of no use for the thread creator since the reset port pin is input-only on the PICs.
I think you've figured out that you want to use the schematic and code for Eric's design. My scheme was/is unnecessarily complicated for a two digit display.dalmation said:Wow- thats a lot of work you've put in. I cant say I understand the programming, but I noticed that on the segment table, there is no A-F?
Mike said:Thank you for the kind words but after a few years playing with PICs it was just a simple and fun exercise and really didn't take much time. I suspect Eric (ericgibbs) would agree?
Actually, in some spare time early this morning I wrote two new versions of the 16F628A firmware for Eric's hardware design because I suspect there may be some subtle problem(s) using a very high refresh rate with the display.
Both versions (below) refresh the display at 62.5 Hz. One version uses interrupts and the other version uses a delay routine and display loop in Main much like Eric's software example.
Have fun and please let us know how it turns out.
Mike
**broken link removed**
dalmation said:Okay- 4 quick questions before I prototype...
1) I ordered some 16F628A chips for the prototype, but they have sent me 16F628 chips (no A) instead. Will that be okay? I'm guessing it will, but I just need to change the model number at the top of the ASM file? Confirm?
The *.cfg are different, but I will have to confirm if significant.
edited: COLOR]
2) the resistors on the base of the transistors... 1Khm: sound about right?
No, at 3.3V you should have a resistor that drives the digit select transistor
harder, say 220R, this should be OK.
3) with a binary input of "0001" (=HEX01), is the "1" the LSB or the MSB? I can figure it out soon enough with the prototype, but it doesnt hurt to ask.
Its the LSB.
Its conventional to start with the lsb on the right, same as ordinary arithmetic, h, t, u.
4) The chip should run okay at 3.3V, right? Datasheet says no prob, so I'm assuming yes.
Thats what the data sheet says.
Thanks again.
-DAlmation.
dalmation said:thanks.
Hopefully it just means the oscillator will possible be slightly different than 4mhz if there is less voltage. I guess I'll find out soon enough
I think its indicating that it will not oscillate.
There is also an external clock pulse available on the same connector as the binary outputs, I'm unsure of the frequency (i'll check)- if it comes to it, I suppose I could use that to synchronise all 4 pic chips and just use 2 (more powerful) transistors to switch all the displays, rather than 2 per display.
I would guess that trying to sync 4 PIC's is a no,no.
- Anyways- I'll try it with the 3.3V and hopefully it will be forgiving enough.
Still annoyed I got wrong chips sent- but too eager to experiment rather than sending them back
I know exactly what you mean
-DAlmation.
dalmation said:Questions
When calculating the resistor value for the LED segments- do I take into account the ~1.2V drop accress the transistor?
The Vdp across the transistor should be about 0.1/0.2V!, the drop across the LED's is about 1.5V,
you take the Vled drop into account.
How do I calculate the resistor values for the base of the transistors? I used 200hm: , but I will be using 5Vdc supply now instead of 3.3V
330R will be OK
Thanks again.
-Dalmation
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?