From 7099218bf1eaa318da4827b21fd9ecaed78502e0 Mon Sep 17 00:00:00 2001 From: Doug Brown Date: Sun, 11 Dec 2011 13:45:17 -0800 Subject: [PATCH] Added some optimization to remove the 1us delay on the write pulse, but I'm not sure that it matters much. --- external_mem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/external_mem.c b/external_mem.c index 752f88c..e440ad9 100644 --- a/external_mem.c +++ b/external_mem.c @@ -141,7 +141,9 @@ void ExternalMem_WriteCycle(uint32_t address, uint32_t data) ExternalMem_DeassertOE(); ExternalMem_SetAddressAndData(address, data); ExternalMem_AssertWE(); - _delay_us(1); // Give it a small amount of time needed? Could I do this with some NOP instructions instead of waiting 1us? + //_delay_us(1); // Give it a small amount of time needed? Could I do this with some NOP instructions instead of waiting 1us? +// The minimum pulse time is 50 ns or so, and since one clock cycle is + // 62.5 ns, this should be fine to assert and deassert immediately ExternalMem_DeassertWE(); }