In SX Microcontrollers, SX/B Compiler and SX-Key Tool, hpham wrote: Try adding in a pause after you select the chip to give the chip time to stabilize. Also increase the pulsout a bit too so that the 8255 can see the pulse. I looked at the datasheet and noticed that the minimum timings and they are all in the ns range which is pretty small so technically your previous timings should be ok. [code] PortA_8255: 'Set up 8255 Port A for Output LOW A1_8255 'Set Address control A1 & A0 Low to set the 8255 Port A for Output PAUSE 50 LOW A0_8255 PAUSE 50 RC_OUT = pattern1 'Set databus for pattern1 LOW CS1_8255 'Set Chip Select Low (Active) [b]PAUSE 10[/b] PULSOUT WR_8255, 1[b]0[/b] 'Pulse Write control Low (Active) for 10 us (port changes state) PAUSE 50 HIGH CS1_8255 'Set Chip Select High (Inactive) - Disable the 8255 databus PAUSE 50 'HOLD TIME FOR 50 MS RETURN Look at the datasheet ( [url=http://www.intersil.com/data/fn/fn2969.pdf]http://www.intersil.com/data/fn/fn2969.pdf[/url] ) for timing information. Also, make sure you pull the RD line high for basic output mode 0. Harrison[/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=150716#m151363 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)