In SX Microcontrollers, SX/B Compiler and SX-Key Tool, tempo wrote: Here's my version of led52, which doesn't work. The device is changed to SX52, and all the obsolete DEVICE directives are removed. I've changed the whole port C to be outputs so I can use any of its bits. What else is needed? [code] ;-------------------------- DEVICE DIRECTIVES -------------------------- DEVICE SX52,OSC1MHZ IFDEF __SASM ;SASM Directive IRC_CAL IRC_SLOW ELSE ;Parallax Assember Directives ENDIF RESET Initialize ;------------------------------ VARIABLES ------------------------------ Count1 EQU $08 Count2 EQU $09 ;---------------------------- DEBUG SETTINGS --------------------------- FREQ 1_000_000 WATCH Count1,16,UDEC ;------------------------ INITIALIZATION ROUTINE ----------------------- Initialize ;Configure port settings mov rc, #%00000000 ;Port C output zero mov !rc,#%00000000 ;Port C output dir. ;---------------------------- MAIN PROGRAM ----------------------------- Main ;Toggle RC with a delay of 64k counts in-between. call delay ;delay mov W,/RC ;toggle all of RC port mov RC,W jmp Main ;goto main Delay clr Count1 ;Initialize Count1, Count2 clr Count2 Loop djnz Count1,loop ;Decrement until all are zero djnz Count2,loop ret ;then return [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=85377#m87261 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)