6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 9:40 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu May 07, 2020 5:19 pm 
Offline

Joined: Tue Jun 19, 2018 8:28 am
Posts: 122
Until now I rather do not have any problem with using MC6840 chip as timer in my projects. I used is a kind of a SysTick or pulse generator.
Now I need to use it a counter of asynchronous pulses on external input. To be precise, I need it to count pulses generated by the Geiger tube. I copied all the circuitry from my previous project, which worked just fine with modern MCU. Unfortunately there is something wrong.

1) I can see pulses counted after manually shorting particular timer input with ground.
2) I can seen on my oscilloscope that pulses are generated by Geiger tube and amplified by the op-amp.
3) But somehow those pulses are not registered by the counter connected to the output of the mentioned op-amp.
4) But if I only short Geiger tube manually, pulses are being registered by the timer.
5) I thought it is issue of pulses being to short, so I used 555 chip to extend them even to 20 ms. It did nothing...

I start thinking that MC6840 simply wasn't designed to count asynchronous pulses of different duration, appearing randomly. Am I right?
If chip can be used as common counter, what may be wrong with my design?


Top
 Profile  
Reply with quote  
PostPosted: Thu May 07, 2020 5:45 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
Let's first look at the version with 20ms pulses. What voltage levels are seen at the input to the 6840?

Also, what output rise and fall times does the 555 generate? Those have maximum specifications in the 6840 datasheet.

Both of the above characteristics are easily corrected by inserting a pair of 74HC14 Schmitt-trigger inverters before the 6840 input. They will take a roughly TTL-compatible input that might vary slowly, and drive rail-to-rail with a sufficiently fast transition time in both directions.

The 6840 does not specify any required synchronisation between input edges and the system clock. It does specify that the pulse width (both high and low) should be at least one system clock cycle plus setup/hold times. That tells me it samples and processes the signals at some specific point in the cycle. A pulse 20ms wide should definitely be detected - get that working, and then try speeding it up.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 46 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron