RESET Problem
For some reason this has happened for the first time. The programs in one of my program folders just had issues with the RESET···· Main command. it says "Redefinition of symbol 'RESET'" and "The symbol <Main> is not defined."
Does anyone have an idea why it is doing this??? this just happened to half of my programs in one of my folders but every where else it works fine.
Post Edited By Moderator (Bean (Hitt Consulting)) : 11/20/2008 1:37:34 PM GMT
Does anyone have an idea why it is doing this??? this just happened to half of my programs in one of my folders but every where else it works fine.
Post Edited By Moderator (Bean (Hitt Consulting)) : 11/20/2008 1:37:34 PM GMT

Comments
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
www.iElectronicDesigns.com
·
Calebjo
Making a pin an input and connecting a pin to ground are not the same thing. When a pin is an output, you can set it high or low. When high, it sources the power supply voltage, when low it is connected to ground. If you turn a pin into an input, it goes into Hi-Z mode which means it is floating and not connected to anything.
Thanks,
PeterM
Thank you for clarifying that for me. How would you instruct the SX to set that output pin to high or low? What would the progam code be for that?
Thanks for your consideration,
Calebjo
Here is a sample program that sets various pins of Port A as outputs and lets you set them high or low.
Thanks,
PeterM
ifdef __SASM DEVICE SX28, turbo, stackx, optionx, OSCHS3 ; Un-comment for SX28 chip ;DEVICE SX48, OSCHS3 ; Un-comment for SX48 chip else DEVICE SX28L,turbo,stackx_optionx endif FREQ 50_000_000 RESET InitSx ;Set reset/boot address ifdef __SASM LIST Q=37;, Q=64 ; This quiets specfic SASM warnings irc_cal IRC_FAST endif ; Control register equates DIR equ $0f InitSx org $0 ; Get SX ready for setting port pin direction mode DIR ; set input/output states ; These are samples of setting different pin(s) as outputs mov !ra, #%11111110 ;Set PortA pin 0 as output mov !ra, #%11111101 ;Set PortA pin 1 as output mov !ra, #%11110110 ;Set PortA pins 3 and 0 as output jmp @Main ; Everything above this line only needs to be done once in program ; Now you can set port pins high or low org $200 Main mov ra, #%11111111 ; Port A, all pins high mov ra, #%11111110 ; Port A, pin 0 low mov ra, #%11110110 ; Port A, pins 0 and 3 low jmp MainThanks for the sample program and clearing the high and low up for me! Now i can actually connect things to ground instead of turning them to Hi-z state. Thanks again!
Calebjo