• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

at89x051 chip validator

Thread starter #1
circuit.png
I'm trying to figure out how I can successfully validate whether a chip is a genuine atmel part. What this circuit is supposed to do is read the first two bytes in signature reading mode. I tested a previously working chip and I tested a new chip I bought on ebay. Both chips returned the same data (1Eh for first byte and FFh for second byte) and I was able to read the second byte with a voltmeter on each pin one-by-one after removing the middle diode marked RESET.

I did add a 47nF ceramic capacitor across the clock button to prevent multiple increments of the rom address.

I posted this question before on stackexchange and they indirectly suggested I use pull-up resistors on the P1 pins of the microcontroller. I added 10K pull-ups and that made no difference.

I then looked further into the atmel datasheet and it states that the maximum rise and fall time the external clock signal should have is 20nS. It also states that upon raising the voltage of the xtal1 pin
, the memory counter increments. I feel I could be exempt from the timings because as soon as I press the button, the voltage jumps to 5V which means increment I think.

I mean I could look into hard-core button circuits (like a 555 debouncer or some debouncers with hysterisis functionality), but to use the button only once just to increment one address, is all that even necessary?
 
#2
Definitely use a proper debouncer for your clock. That would take care of any doubts about bouncing and rise/fall times. You've gone to a lot of work to build this validator a shortcut like that can easily keep it from working or maybe worse show you the contents of a wrong address.
 

jpanhalt

Well-Known Member
Most Helpful Member
#3
If there are interrupt-on-change (or any other type) flags in port-linked registers, you can just read the flag as your input. Such flags are set, but not cleared unless you do something to clear them. No need to enable interrupts for that to work. At least PIC chips work that way. Then when ready for the next test, clear the flags. That way, there is no "hysteresis," no delay, and no additional hardware. Of course, there are other ways to do software debouncing
 

Latest threads

EE World Online Articles

Loading

 
Top