SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By alexanders
#11984
Hi to all :D

I am making a program that reads and writes to a ram (cypress) using the data ports (as i/o, bidirectional) and control ports (for the we, oe, etc) of the parallel port of my computer using visual basic, however when i tried the program at first i works fine, however after repeating entering and writing data to the ram i get a error, for example

Address Data input Data output
1 2 2
2 4 2
3 7 7

as you can see in the 2nd data output, the ram read the data on address 1 instead of 2! however this happens about 3/10 times so i know my program can write and read data correctly. but can anybody explain this? my ram has a 12ns access time so i thought timing should not be a problem, however eventhough i make the writing and reading equal to 1sec per instruction (we to high, address changes.. etc) i still get error messages. Btw, i connected the port directly to the ram without any resistors, becuase i that will only make a delay in the access time (correct?) thank you everyone :D

you can contact me at glenn.fetalvero@gmail.com
User avatar
By leon_heller
#11986
You could try looking at the various signals with a suitable scope, to make sure that you are actually satisfying the RAM timing requirements. The printer port is very slow, which might be causing problems.

Leon
By alexanders
#11993
so even though i made the output to 1ms = 1Mhz, its still to slow for the ram? i thought errors are made because of fast input/read command. btw, do you happen to know what's the maximum speed of the parallel port?

thank you again for your time :D
User avatar
By leon_heller
#11995
Try putting some delays in between enabling the RAM and reading/writing data. Just a guess on my part.

Leon
By rod_vdb
#12008
alexanders wrote:so even though i made the output to 1ms = 1Mhz, its still to slow for the ram? i thought errors are made because of fast input/read command. btw, do you happen to know what's the maximum speed of the parallel port?

thank you again for your time :D
Just to confirm:

1ms = 1 milli second = 1/1000s = 1kHz
1us = 1 micro second = 1/1000000 = 1MHz
User avatar
By leon_heller
#12010
Yes, those times are right.

Leon
By alexanders
#12022
i made a mistake sorry, i made 1ms=1khz delay on each of the output so theres a delay :D
in addition when i write a high bit, the error seems to get worst example:

address data output
1 240 240
2 8 114
3 98 114
4 2 98

i mean where in world did the ram get the 114???

thank you for your replies :D
By Kuroi Kenjin
#12039
Exactly what chip is this?