Output Pin behavior on startup?

PADJ

Member
I have a 20M2 picaxe based memory tester that functions correctly in simulation.
My concern is I must ensure that my '-chip select' line does not go to a logic "0" during power up of the hardware, or it will invalidate the test.

I believe that all pins are configured as inputs at startup.

I have used a 5k pullup on the -CS line to ensure it initially follows the positive supply during powerup.

Picaxe +V supply ---/\/\/\/\---- Pin C.7

All other pins just wire across to DUT

I then use HIGH function to set it as an output, and a "1" -- but is this glitch-free in hardware, or is there a better solution?

Code:
High C.7
Phil

edit: schematic and code added as requested
 
Last edited:

nick12ab

Senior Member
My concern is I must ensure that my '-chip select' line does not go to a logic "0" during power up of the hardware, or it will invalidate the test.
Is this chip select on the memory chip? Why would allowing it to go low invalidate the test? What memory chip are you testing?

I believe that all pins are configured as inputs at startup.
Correct, except for output-only pins, of which there aren't any except for Serial Out which has an optional DAC.

I then use HIGH function to set it as an output, and a "1" -- but is this glitch-free in hardware, or is there a better solution?
Rev-Ed aren't revealing about this at all. The first sentence suggests the pin is set as an output first but the second suggests that it is set high first:
Make pin an output and switch it high. On microcontrollers with configurable input/output pins this command also automatically configures the pin as an output.
Do you have your circuit assembled? Then try it and see if it works.
 

PADJ

Member
Is this chip select on the memory chip? Why would allowing it to go low invalidate the test? What memory chip are you testing?

Do you have your circuit assembled? Then try it and see if it works.
I'm looking at a data disturb problem on battery backed SRAMs. The only way I can guarantee the tester did not introduce the error is to keep CS high until I'm ready to read data.

Rev-Ed aren't revealing about this at all. The first sentence suggests the pin is set as an output first but the second suggests that it is set high first:
That's why I'm asking!

"Try it and see" is not sufficient. I'll put a physical switch between the 20M2 and DUT, and close it after powering up.
 

Technical

Technical Support
Staff member
The firmware always sets the high/low pin status before the data direction register is ever changed. This is normal standard programming technque - to do it any other way would be a very bad idea!
 

PADJ

Member
The firmware always sets the high/low pin status before the data direction register is ever changed. This is normal standard programming technque - to do it any other way would be a very bad idea!
Thanks for the definitive answer. Problem solved!
 

MartinM57

Moderator
...but if it's so important, you're still going to 'scope up the /CS line during the testing of your device and look at it during startup just to be really sure, aren't you? :)
 

PADJ

Member
...but if it's so important, you're still going to 'scope up the /CS line during the testing of your device and look at it during startup just to be really sure, aren't you? :)
What! You doubt "Technical"? Shame on you. :eek:

Actually of course I will, and have already. But I wouldn't be able to catch say a 100nS glitch on my antique 'scope.
I have also tried feeding -CS into a 10 Mhz counter and seen no counts registered. But again that's limited capability.

Phil
 

MartinM57

Moderator
You could put /CS into a monostable or flip-flop that holds any high speed gitch and lights a LED...or ask Santa Claus for a early present of a Saleae Logic 8/16 :)
 

PADJ

Member
More likely a $10 chinese clone
Actually Santa (aka China Mail) brought a $6.55 Saleae Logic (that's what is says on the label so it must be genuine!! :eek: ), and it works very well with the latest software.

Merry Xmas to all.
 
Top