阅读:1626回复:3
ram写的不对
请教各位做过双口RAM的大侠:
我现在一边是单片机,往双口RAM里写,一边是PCI9052,从双口RAM里读数。 读和写的时候都是8位宽度。 现在出错的现象是这样的: 400 ff eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea ^^ 410 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea 420 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea 430 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea 440 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea 450 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea 460 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea 470 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea 480 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea 490 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea ........ 4f0 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea 500 ff eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea ^^ 510 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea 520 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea ........ 5f0 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea 600 ff eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea ^^ 610 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea ....... 6f0 ea eb ea ea ea eb ea ea ea eb ea ea ea eb ea ea 也就是说每次在100的边界就会出现ff,在每一个1,5,9,d或者别的没隔四个 位置的地方,会把原来的数加1或者减1。单片机写的都是ea,换成别的的数, 如55,77,88,94等,都是这样的规律。 |
|
沙发#
发布于:2002-06-21 12:39
1.你的双口RAM和9052的地址线怎么连的?
2.9052读双口RAM的信号译码是什么样? 我感觉你从上面着手找问题,应该能解决。 祝好运! :D :D :D :D |
|
板凳#
发布于:2002-06-21 12:52
我说的未必对,仅供参考。
双口RAM有两个问题需要注意: 1》单片机写与PC读需要状态位以保证其不会对同一地址操作。 2》口RAM有地址问题,这与FIFO不同。 我认为,你的问题更象是2的原因,每次出现ff,似乎是: 1》译码信号没有产生 2》虽然产生了译码信号,但是RAM地址错误 3》RAM地址没错,但是其它逻辑出了问题,造成读信号有效期间,数据信号为高阻态。 |
|
地板#
发布于:2002-06-21 22:19
谢谢各位兄弟。
我正在按照各位的提议在找原因,找到了就给你们加分。聊表谢意。 上次的帐号加得现在下东西都不行了,:) |
|