In SX Microcontrollers, SX/B Compiler and SX-Key Tool, DavidAHouse wrote: Here is the code: [code] ; Set device to SX28, enable external high speed oscillator DEVICE SX28L, STACKX, OPTIONX, TURBO IRC_CAL IRC_FAST RESET Start ; set restart vector to start of code FREQ 10_000_000 ; Variable storage count1 EQU $08 count2 EQU $09 ORG $000 Start ; Initialize I/O controller for Pico Edition A->Input, B->Output, C->Output mov w, #$1F ; Set mode register to write direction register mov m,w mov RA, #%00000000 ; Set port A output latch to zero mov !RA, #%00000000 ; Set port A direction mov RC, #%00000000 ; Set port C output latch to zero mov !RC, #%00000000 ; Set port C direction mov !RB, #%11111111 ; Set port B direction mov w, #$1E ; Set mode register to write pullup resistor mov m,w mov !RB, #%00000000 ; Set joystick inputs pullups on (0=on, 1=off) ; ///////////////////////////////////////////////////////////////////////////// ; Main Program Loop ; ///////////////////////////////////////////////////////////////////////////// Main mov W,/RA ; grab inverse RA mov RA,W ; and store it back in RA REPT 10 call delay ; delay to slow down blinking ENDR jmp Main ; goto main ; delay function counts 64K counts and returns Delay clr Count1 ; Initialize Count1, Count2 clr Count2 Loop djnz Count1,loop ; Decrement until all are zero djnz Count2,loop RET ; then return [/code] And i'm clocking at 10Mhz. This code just blinks a bank of 4 LEDs. Nothing special. Thanks. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=132602#m132615 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)