In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Vertex78 wrote: Here is the latest code that I have written trying to get it to work ; ///////////////////////////////////////////////////////////////////////////// ; Set device attributes ; ///////////////////////////////////////////////////////////////////////////// DEVICE SX52 RESET Init FREQ 80_000_000 DEVICE OSCHS3 ; High-speed external oscillator DEVICE IFBD ; Crystal feedback disabled DEVICE XTLBUFD ; Crystal drive disabled ;////////////////////////////////////////////////////////////////////////////// ; rb.0 = clr active low ; rb.1 = wr active low ; rb.2 = bl active low ; rb.3 = cue ; rb.4 = cu ; rb.5 = A0 ; rb.6 = A1 clrd equ rb.0 wr equ rb.1 bl equ rb.2 cue equ rb.3 cu equ rb.4 a0 equ rb.5 a1 equ rb.6 init mov !rd, #%00000000 mov !rb, #%00000000 Start setb cu setb bl clrb cue setb clrd ;digit address clrb a0 clrb a1 ;load ascii value mov rd, #%01011010 ;timing diagram shows address setup time as 10ns nop ; 12.5 ns delay clrb wr ;timing diagram shows write time as 90ns jmp $+1 ;100ns delay jmp $+1 nop nop setb wr jmp $ ok when i run this code, if i hold the reset button it shows a Z in the right most position (which is what should be there with the programm running normal) and when I let go of the reset it shows all segments lit up in left most position. Though If i turn the xgs of and then back on sometime the Z will be lit up in the correct place but then if I hit the reset it goes to a random spot with jiberish. I think maybe my timimg must be off. But from what I can tell from their timing diagram its ok it you go over the amount of time it takes, like how data write says 90ns and I did 100ns since that is the closest I can get without going under 90ns. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=82181#m82182 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)