Tuesday 3 September 2019

Binary counter (SN74LV8154) jumps (internal bits seems to flip)


I am using a "Dual 16-bit binary counter with 3-state output registers" (SN74LV8154) to count input pulses up to 32 bits.


It is working fine most of the time, but some of the bits in the counter seem to flip randomly. The result is reflected in the register, as I see the output value sometimes jump forward and/or backward.


Jumps are persistent (not punctual misreadings) since the value does not jump the other way around right after the issue. e.g.




  1. 0x12fe

  2. 0x12ff

  3. 0x1200 (should be 0x1300)

  4. 0x1201

  5. 0x1202 (0x0100 still not on)


The chip allows to read byte by byte with the help of a 4 bit word selector. This is done quite frequently, word by word, and I record a timeseries with the result. I expect the counter to go up by a few increments between reads.


The result is fine most of the time, but it looks like some internal carries are either forgotten or doubled.


Here are a few examples:


|----------------------+------------------------+-------------|

| Before | After | Jump |
| | (Expected) | |
|----------------------+------------------------+-------------|
| 0b010011000011111111 | 0b010011001000000000 | 0b100000000 |
| | (0b010011000100000000) | |
| 0b110001000001111111 | 0b110001000000000000 | -0b10000000 |
| | (0b110001000010000000) | |
| 0b111100101011111111 | 0b111100110000000000 | 0b100000000 |
| | (0b111100101100000000) | |
|----------------------+------------------------+-------------|


I also saw jumps by +/- 16, +/- 32, +/-65536, so I guess the issue is not related to the word size.


Any help on how to investigate this would be much appreciated.


Julien



Answer



Thanks @ThePhoton and @Icy for your comments, which helped me fix the issue.


As suspected by @ThePhoton, the issue was the lack of bypass capacitors across the counter's power supply. The issue was especially occurring when several register bits were switching as the same time.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...