chronograph trouble, PIC oriented

Status
Not open for further replies.
Alright, here is what the project is. it will be once completed a simple chronograph which will calculate how fast an object can fly between the two gates (phototransistor/white LED) it will then either display the speed or the time that it took for the object to travel between the two gates on the three 7segment common anode displays through 3 CD4026AE's with transistor IC's now I know that the counter works when all of the certain pins on the first 4026 in the chain are connected directly to either 0v, or +4.5VDC (shown in the video on the link below.)

YouTube - 4026 counter
(i made sure I was dicharged in the video before I touched the counter)

Here's my problem. When it is connected to the microcontroller it doesn't do what it is suposed to do. when it turns on (in the program), it has all of the outputs off until one of the switches is pressed--which should just display the three decimal points as the displays are common anode. Instead, it displays the 000 as if the screen was enabled, and then finally after about 25-30seconds everything goes dark leaving the three decimal points. During the whole time pressing the input switches does nothing.

This told me that it was an oscillator problem, but I've already tried swapping out the PIC as well as the 4MHz oscillator which does nothing.

When you pull out the PIC and reconnect the necessary pins on the 4026 to ground/4.5v thecounter still works, I just cant get it to respond to the PIC.

I know that a very probable second problem that I will have is with the actual gates and if anyone has any suggestions on what to change please post them as well.

attached are the schematics, a photo of the circuit, and a program that should increment the counter every 2 seconds.



note----in the actual circuit the microcontroller is a PIC16F627, MCLR-pin4 is actually connected to +4.5vdc with a 56Ω resistor, and Vdd-pin 14 is actually connected to +4.5Vdc
 

Attachments

  • PICChronograph.jpg
    366.4 KB · Views: 278
  • 100_2128.JPG
    326.3 KB · Views: 252
  • PICCHRT2.asm
    3.7 KB · Views: 185
While I could accomplish the same thing using a PIC16F877, this project is being entered into a contest where the circuit is being graded by how complex that it is rather than by its simplicity (hopefully putting it ahead of the simple single IC circuits that everyone else has done every other year. If I make it to nationals I may build a second one just using one pic attached to the same board to show just how a PIC with multiple I/O's can greatly simplify the circuit while at the same time allow the programmer more options such as displaying basic words.


if only I can get the PIC to communicate with the counter.
 
 
 
Alright, I just tried adding the capacitors, but it doesn't change anything.

I"ve also tried replacing the PIC with brand new never been programmed PIC16F628 (of course changing the program slightly to account for it) and it still makes no difference.


I'm guessing it's a programming or an ossilator problem as when it is connected every minute or so it will increment the counter to a random # and I tried completely disconnecting it from everything except for the two led's, oscillator, MCLR resistor, and switches and I can't even get it to oscillate between the two leds. (added a few BCF and BSF commands in the code along side with what is suposed to increment the counter for the pins that they are on)

anyone have anyideas here, I'm completely lost.
 
UPDATE---

there was more than 1 problem, but still a very large issue



now, I never would have expected this,but those small 4026 7-segment counters/ transistor IC's/7-segment displays were drawing so much current, that the microcontroller wasn't be able to start up.


so, I'm gonna have everything be run of of a lm7805 +5v voltage regulator which is in turn powered by an 8.4v 1600mAh NiMh battery pack--(yes they are the same one's from my other post, and yes this project is also due in less than a week)

I still haven't been able test if that setup for a photosensor would work.


Does anyone have any input that they might be able to give on that simple circuit? (the photodiodes are NPN FPT100A 's)
 
I just noticed that the caps on your crystal are 22uF. They should be 22pF. This would stop the oscillator working.

Mike.
 
I just noticed that the caps on your crystal are 22uF. They should be 22pF. This would stop the oscillator working.

Mike.

Thankyou, I'll have to change that in the diagram, I never did notice that.
They are infact 22pF in the built circuit. I just mislabeled those components in the circuit diagram.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…