In SX Microcontrollers, SX/B Compiler and SX-Key Tool, inaki wrote: Here is my code. By the way, I have checked that SHIFTOUT is working as expected testing the signals in pins CS, SCK and SI. When reading, signal SO stays flat however. 'The following code is intended to write a $5A byte on address zero and then read it back. 'I am using a FM25640 Ramtron chip (8KB, 5Mhz) CS VAR RC.0 SCK VAR RC.3 SI VAR RC.2 SO VAR RC.1 MyData VAR byte TRIS_C = %00000010 CS = 0 SHIFTOUT SI, SCK, MSBFIRST, 6 'W-ENABLE CS = 1 'WRITE a byte on address zero CS = 0 SHIFTOUT SI, SCK, MSBFIRST, 2 'WRITE SHIFTOUT SI, SCK, MSBFIRST, 0 'adr high SHIFTOUT SI, SCK, MSBFIRST, 0 'adr low SHIFTOUT SI, SCK, MSBFIRST, $5A 'data CS = 1 'READ address zero CS = 0 SHIFTOUT SI, SCK, MSBFIRST, 3 'READ SHIFTOUT SI, SCK, MSBFIRST, 0 'adr high SHIFTOUT SI, SCK, MSBFIRST, 0 'adr low SHIFTIN SO, SCK, MSBPRE, MyData CS = 1 end ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=105053#m105251 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)