Sx Proto Board Project ......Newbe
Hi, EveryOne
I am new to this Forum
I have Play with the Basic Stamp·for a few years·but not with SX Chip
I have look at the online stuff that you have for the SX
I bought a few of these
·http://www.parallax.com/detail.asp?product_id=45302
I have project that all i need to is.....>>>>>>
Look at an input if it = 1
Turn on output1 ON
Then have timer cout for a minute
Then turn output2 ON
When input = 0
Then ·have output2 Turn OFF
Then have timer count for a minute
Then turn output1 turn OFF
Then Repeat·
Now i read that this chip has timer on the chip
I would like to know how write this routine
Now i could use a Basic Stamp for this and know how to write this
I· thought that this was an easy route to learn how to use a SX
·
Please let me know in i am wrong in this idea
But i would like to learn something more about a different chip
Is there any one that can help with this Thanks ahead a time for your time
Stefan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·Thanks For all and Help that You Can Give so that i can how to write SX code
······································· Stefan
Post Edited (Little_Part_Man) : 9/13/2007 5:35:44 PM GMT
I am new to this Forum
I have Play with the Basic Stamp·for a few years·but not with SX Chip
I have look at the online stuff that you have for the SX
I bought a few of these
·http://www.parallax.com/detail.asp?product_id=45302
I have project that all i need to is.....>>>>>>
Look at an input if it = 1
Turn on output1 ON
Then have timer cout for a minute
Then turn output2 ON
When input = 0
Then ·have output2 Turn OFF
Then have timer count for a minute
Then turn output1 turn OFF
Then Repeat·
Now i read that this chip has timer on the chip
I would like to know how write this routine
Now i could use a Basic Stamp for this and know how to write this
I· thought that this was an easy route to learn how to use a SX
·
Please let me know in i am wrong in this idea
But i would like to learn something more about a different chip
Is there any one that can help with this Thanks ahead a time for your time
Stefan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·Thanks For all and Help that You Can Give so that i can how to write SX code
······································· Stefan
Post Edited (Little_Part_Man) : 9/13/2007 5:35:44 PM GMT
Comments
Thanks for your reply·I am· sorrry·I did reply sooner
I made a mistake when i bought these SX28 instead SX48 that ok i will find a use for them
But i would like to learn how to write this Assemble
Code
·http://www.parallax.com/detail.asp?product_id=45300
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·Thanks For all and Help that You Can Give so that i can how to write SX code
······································· Stefan
Post Edited (Little_Part_Man) : 9/15/2007 4:05:17 AM GMT
Thank You for your reply
Here is the Basic Stamp Code that i will use·this is·only·part of what i have now
But i would like to learn how to write this Assemble Code
I will be buying the SX48 Proto boards
Now i know that·this chip has a timer and i would like to learn how to use this as well
Thanks for your help ahead of time···
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·Thanks For all and Help that You Can Give so that i can how to write SX code
······································· Stefan
Post Edited (Little_Part_Man) : 9/15/2007 4:25:22 AM GMT
I've written several articles for Nuts & Volts on SX/B; you might want to go back and read them, as well as the help file that is included. One way to learn assembly is to write a program in SX/B and then look at the compiled output; I've learned a lot this way and when I need assembly in a program I usually start with SX/B, compile it, then take the assembly output and hand-optimize it to suit my needs.
I think this is what your trying to do. when you get a trigger you turn on your power relay and its led, wait 60 secs, then turn on your con relay. After the trigger is released you turn off your con relay and its led, wait 60 secs, then turn off your power relay.
Hope I helped, I'm just trying to get better at programming myself
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
Maybe I should have waited to do that......
BUTTON_OFF:
·IF IN=1 THEN GOTO BUTTON_OFF · LOW Con_relay
· LOW Con_relay_led
· PAUSE Timer
· LOW Power_relay
· LOW Power_relay_led
Thank You for your reply
What i want to do is have the INPUT control the two relays by input status only
That is when·INPUT has power then Start Power ON routine then when power is OFF on the INPUT then Start The OFF Routine
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·Thanks For all and Help that You Can Give so that i can how to write SX code
······································· Stefan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
Maybe I should have waited to do that......
Thank You for your reply and help
I do not think that you understand what i am trying to do here
When the INPUT see 5 Volts then want to have this routine run
··IF IN1 = 1
· HIGH Power_relay
· HIGH Power_relay_led
· PAUSE Timer
· HIGH Con_relay
· HIGH Con_relay_led
When the INPUT see·0 Volts then want to have this routine run
IF IN = 0 · LOW Con_relay
· LOW Con_relay_led
· PAUSE Timer
· LOW Power_relay
· LOW Power_relay_led
·I hope that now you can understand what i want to here with these routines
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·Thanks For all and Help that You Can Give so that i can how to write SX code
······································· Stefan
Post Edited (Little_Part_Man) : 9/15/2007 9:39:02 PM GMT
Thank You· for your reply
I have some studying to do and a lot to read and understand and it will take some time for all this sense's
to me· and for me to understand all of it
Can you help me understand some thing here that are in blue
DEVICE········· SX28, OSC4MHZ, TURBO, STACKX, OPTIONX, BOR42 How do you know·where and when to use this
FREQ··········· 4_000_000
ID············· "Stefan"
DELAY_MS·SUB·1, 2···' delay in milliseconds· What is this do, Is this for sub routine
Start:
· PLP_C = %11110000····' pull-ups on unused pins Do you need to tie all unused pins to vdd
· PLP_B = %00000001
· PLP_A = %0000·········· What is this setting
'
' Subroutine / Function Code
'
tmpB1··VAR·Byte··· Am i right that this var for the sub routines
tmpB2··VAR·Byte
tmpW1··VAR·Word
' Use: DELAY_MS ms
' -- delays program in milliseconds
SUB DELAY_MS
· IF __PARAMCNT = 1 THEN······ What dose do and what is it for
··· tmpW1 = __PARAM1··························· ' save byte value What saved byte value
· ELSE
··· tmpW1 = __WPARAM12························· ' save word value· What saved·word value
· ENDIF
· PAUSE tmpW1
· ENDSUB
Thank You for all of your help and time in helping learn the SX Code
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·Thanks For all and Help that You Can Give so that i can how to write SX code
······································· Stefan
Post Edited (Little_Part_Man) : 9/15/2007 10:19:38 PM GMT