SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By zbalz
#7043
I am running a 16F877 PIC with a 4MHz clock currently. I am also currently interfacing it to MAXIM-IC's 2kx8 Static Ram, DS2016.

Right now, because of my slow clock, I am able to directly interface to the SRAM (read and write) with no timing issues. Because the SRAM has a 100 nS access time, I don't ever have to pause or even poll anything. This is because of the 4MHz clock (4 MHz clock = 1 instruction every 250 nS). Therefore, I can just:
load data and address busses, enable SRAM chip, enable write pin (which latches data), disable write pin, disable chip...no pausing or polling.


However, I may want to upgrade to a 20 MHz clock where my instruction cycle is then every 50 nS..making it necessary to pause or poll in Static Ram access.

What is the best way to poll a static RAM unit to see if the access cycle is complete? I can't poll the data bus because it only returns to zero after the chip is disabled. Should I just use one of the PIC's built in TIMER modules? Should I just use a standard PAUSE command?

What is your recommendation?

Thanks,

Tom