Exact match. Not showing close matches.
PICList
Thread
'[SX] RESET Problem'
2008\11\20@223544
by
Calebon/a
|
|
Nevermind I retyped all of the programs and for some reason they all work fine now. :shocked: Must be a noob mistake or something. I am now trying to figure out how to turn pins into input; basically just connect them the ground. My programs aren't turning the appropriate pins to gnd so i am all confused. Attached is one of my first programs where I am trying to find out how to connect the pins to ground. My assembly language "vocabulary" isn't quite expanded so any help is appreciated. ;-)
Calebjo
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=308356#m308588
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)
2008\11\21@090701 by PJMontyn/a
|
|
Calebjo,
Turning a pin to 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
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=308356#m308642
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)
2008\11\21@094220 by Calebon/a
|
|
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
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=308356#m308645
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)
2008\11\24@120926 by PJMontyn/a
|
|
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 Main
|
|
PeterM,
Thanks 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
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=308356#m309575
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)
More... (looser matching)
- Last day of these posts
- In 2008
, 2009 only
- Today
- New search...