How to add a reset after 4 clock cycles in LTSpice for 4 bit SAR logic

Thread Starter

KingPapaya

Joined Oct 28, 2018
14
I have created the 4 bit schematic, with a smaller value for Ain at the comparator input. It now only ranges from 0-1.2V, where the last bit seems to have issues.

For Ain=1.1, these are my results, which is not expected, since I should be getting 1110 instead of 1111:
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,766
hi KP,
Downloaded your LTS asc sim file, checking it out.
E

EDIT:
Check the switching Rise/Fall times, the Bits are indeterminate due to overlapping rise/fall edges.
Why are you using 1.8V logic levels instead of say 3.3v, also using generic logic gates.?

AA1 09-Nov-18 08.13.gif
 
Last edited:

ericgibbs

Joined Jan 29, 2010
18,766
hi,
With the less than 1.8V logic levels [ showing as close to 1.2v] the step intervals for a 4Bit Byte increment are approx 75mV, which I would consider as being insufficient.
Be aware the loading of the B0,1,2,3 outputs is not constant, but changes with the bit pattern, so 75mV is 'tight'

Check this expanded plot.
E
EDIT:
Note:Check the state of B3.
 

Attachments

Last edited:

Thread Starter

KingPapaya

Joined Oct 28, 2018
14
hi,
With the less than 1.8V logic levels [ showing as close to 1.2v] the step intervals for a 4Bit Byte increment are approx 75mV, which I would consider as being insufficient.
Be aware the loading of the B0,1,2,3 outputs is not constant, but changes with the bit pattern, so 75mV is 'tight'

Check this expanded plot.
E
EDIT:
Note:Check the state of B3.
Since 1.2V is too low, should I try the 3.3V you recommended? Also how much should the rise and fall times vary?
 

ericgibbs

Joined Jan 29, 2010
18,766
hi,
I suggested the 3.3v logic power supply as it a well used standard, also the LTS library of CMOS IC's include the option of a 3.3Vdd.
I see that you are using a10MHz clock with Rise times of 10f .

Do you have the 74HCT lib in your LTS folder.?
E
 

Thread Starter

KingPapaya

Joined Oct 28, 2018
14
Currently I only have the default library. In the meanwhile I will try 3.3V.
EDIT: So far the results are still inaccurate. What else should I be trying to fix?
 
Last edited:

ericgibbs

Joined Jan 29, 2010
18,766
Hi KP.
As this Homework I can only give limited help.
I would suggest you make a post describing how you would expect the SAR counter project to work, we can then point out any errors in your solution.
Eric.
 
Top