In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Blackbird455 wrote: ok I made this...........view the attachment................and then kept trying to connect, finally did, but have not since..........think i fried the blitz. Here is the code, it might be good , but all i got was oscillation, even after changing delay_ms 40 to 2000: ' ========================================================================= ' ' File...... REPS.SXB ' Purpose... ' Author.... Jon Williams, EFX-TEK ' Copyright (c) 2007 EFX-TEK ' Some Rights Reserved ' -- see http://creativecommons.org/licenses/by/3.0/ ' E-mail.... jwilliams@efx-tek.com ' Started... ' Updated... ' ' ========================================================================= ' ------------------------------------------------------------------------- ' Program Description ' ------------------------------------------------------------------------- ' ------------------------------------------------------------------------- ' Conditional Compilation Symbols ' ------------------------------------------------------------------------- ' ------------------------------------------------------------------------- ' Device Settings ' ------------------------------------------------------------------------- DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX, BOR42 FREQ 4_000_000 ID "Reps" ' ------------------------------------------------------------------------- ' I/O Pins ' ------------------------------------------------------------------------- Light1 PIN RB.1 OUTPUT Light2 PIN RB.7 OUTPUT ' ------------------------------------------------------------------------- ' Constants ' ------------------------------------------------------------------------- IsOn CON 1 IsOff CON 0 ' ------------------------------------------------------------------------- ' Variables ' ------------------------------------------------------------------------- reps VAR Word idx VAR Byte tmpW1 VAR Word ' ========================================================================= ' INTERRUPT ' ========================================================================= ' RETURNINT ' ========================================================================= PROGRAM Start ' ========================================================================= ' ------------------------------------------------------------------------- ' Subroutine / Function Declarations ' ------------------------------------------------------------------------- DELAY_MS SUB 1, 2 ' ------------------------------------------------------------------------- ' Program Code ' ------------------------------------------------------------------------- Start: Main: FOR reps = 0 TO 65535 STEP 3000 FOR idx = 1 TO 4 Light1 = IsOn DELAY_MS 40 Light1 = IsOff DELAY_MS 40 NEXT FOR idx = 1 TO 4 Light2 = IsOn DELAY_MS 40 Light2 = IsOff DELAY_MS 40 NEXT NEXT END ' ------------------------------------------------------------------------- ' Subroutine / Function Code ' ------------------------------------------------------------------------- ' Use: DELAY_MS mSecs ' -- delays program in milliseconds SUB DELAY_MS IF __PARAMCNT = 1 THEN tmpW1 = __PARAM1 ELSE tmpW1 = __WPARAM12 ENDIF PAUSE tmpW1 ENDSUB ' ------------------------------------------------------------------------- ' ------------------------------------------------------------------------- ' User Data ' ------------------------------------------------------------------------- ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=210130#m210321 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)