Author Topic: Need help getting a 74HC40103 to count down  (Read 965 times)

0 Members and 1 Guest are viewing this topic.

Offline gkmaiaTopic starter

  • Frequent Contributor
  • **
  • Posts: 528
  • Country: nz
  • Electronics Hobbyist
Need help getting a 74HC40103 to count down
« on: June 18, 2019, 10:08:01 pm »
My TC (terminal count output (active LOW)) is stuck on LOW, which stops the function to propagate through the NAND gate to TC.

If I force 1A HIGH the function reaches TC. So far my gate is working.

But even forcing it I get no pulse from P0 up to P7 as sign it is counting something.

Have added a switch to bring MR (asynchronous master reset input (active LOW)) to LOW hoping to reset the counter but it also has no effect.

« Last Edit: June 18, 2019, 11:52:06 pm by gkmaia »
 

Offline MT.Shariq

  • Newbie
  • Posts: 2
  • Country: sa
Re: Need help getting a 74HC40103 to count down
« Reply #1 on: June 20, 2019, 09:42:23 am »
If you force NAND inputs high, do you get any change in P0-P7?
 
The following users thanked this post: gkmaia

Offline gkmaiaTopic starter

  • Frequent Contributor
  • **
  • Posts: 528
  • Country: nz
  • Electronics Hobbyist
Re: Need help getting a 74HC40103 to count down
« Reply #2 on: June 21, 2019, 12:08:37 am »
Nope, nothing.
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2549
  • Country: us
Re: Need help getting a 74HC40103 to count down
« Reply #3 on: June 21, 2019, 11:21:54 am »
I would remove the NAND gate and feed your clock directly into the CP pin to get it to count. 
You will need to do a MR to get it to pre-load and then count down after MR is removed.

You would find it more helpful if you examined the control lines and just looked at some of the lower output count pins if your logic analyzer is only 8 bits wide. 
You only need a few LSB bits to determine if it is doing anything.

See the Function Table in the datasheet (L=Low, H=High, x=Don't care):
Apply Reset then remove.

RESET: 
   MR=L, PL=x, PE=x, TE=x

COUNT DOWN:
   MR=H, PL=H, PE=H, TE=L

 
The following users thanked this post: gkmaia

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: Need help getting a 74HC40103 to count down
« Reply #4 on: June 21, 2019, 12:18:58 pm »
But even forcing it I get no pulse from P0 up to P7 as sign it is counting something.
If I'm reading the datasheet correctly, P0-P7 are inputs, and only inputs.
 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: Need help getting a 74HC40103 to count down
« Reply #5 on: June 21, 2019, 12:41:55 pm »
But even forcing it I get no pulse from P0 up to P7 as sign it is counting something.
If I'm reading the datasheet correctly, P0-P7 are inputs, and only inputs.
You are right.  It is a binary down counter that outputs LOW on TC when it reaches 0 from a default value of 255 or a preset value (P0-P7) that can be set by a negative pulse on ~PL
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2549
  • Country: us
Re: Need help getting a 74HC40103 to count down
« Reply #6 on: June 21, 2019, 01:03:23 pm »
But even forcing it I get no pulse from P0 up to P7 as sign it is counting something.
If I'm reading the datasheet correctly, P0-P7 are inputs, and only inputs.

Oh my.  How did I miss that?  The logic symbol is a dead give away.

   
 

Offline gkmaiaTopic starter

  • Frequent Contributor
  • **
  • Posts: 528
  • Country: nz
  • Electronics Hobbyist
Re: Need help getting a 74HC40103 to count down
« Reply #7 on: June 21, 2019, 10:50:55 pm »
I would remove the NAND gate and feed your clock directly into the CP pin to get it to count. 
You will need to do a MR to get it to pre-load and then count down after MR is removed.

You would find it more helpful if you examined the control lines and just looked at some of the lower output count pins if your logic analyzer is only 8 bits wide. 
You only need a few LSB bits to determine if it is doing anything.

See the Function Table in the datasheet (L=Low, H=High, x=Don't care):
Apply Reset then remove.

RESET: 
   MR=L, PL=x, PE=x, TE=x

COUNT DOWN:
   MR=H, PL=H, PE=H, TE=L



Thanks for that.

I missed the Ps were inputs too. As per the LCD schematics it is getting a decimal 96 as a preset counter.
I managed to get a low TC a couple times a couple seconds after sending a MR LOW.



 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf