would i be able to do this with a sx28?
i have·4 different (hi/lo) inputs that i want to input to the chip and one output needed
*edit read below
any help much appreciated, im just starting out with programing the sx chips. im use to doing pics.
Post Edited (infinkc) : 2/12/2007 2:52:02 PM GMT
*edit read below
any help much appreciated, im just starting out with programing the sx chips. im use to doing pics.
Post Edited (infinkc) : 2/12/2007 2:52:02 PM GMT
Comments
·· This is just simple logic so it would be very easy for an SX to do. There are a few ways to implement it, but if you make a truth table it should make things much easier when you write the code.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
This is not very elegant looking, it's just to demonstrate the point. It also assumes you've made RA.0 an output.
you can prolly get away with just connecting it to +5v.. I think the resistor is used to protect the SX from power malfunctions.
Perhaps if you caused too much current to draw out of one of the pins, or somehow disconnected the +5v supply to the SX then the chip would be powered thru the reset line and that would most likely cause major issues.
connecting the reset line directly to +5v is ok, I just tried it with my own setup.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Meh. Nothing here, move along.
it turns out i only needed to input 3 signals and output one. What im trying to acclomplish:
when one of the inputs goes HIGH, doesnt matter what one, i want the output to go·HIGH also
my code so far
LCD_Power·· PIN··· RB.1····· 'Led pin anode connection
LEDon· CON·· 1····· 'high state
IF RA.0 = LEDon· THEN
· IF RA.1 = LEDon THEN
·· IF RA.2 = LEDon THEN
HIGH LCD_Power
ELSE
·· ENDIF
· ENDIF
ENDIF
If i set RA.0, RA.1, RA.2 LOW RB.1·goes· LOW, but when there is no connection RB.1 stays HIGH, ·how can i make it·stay LOW and only go HIGH when the input is HIGH? i guess what i want is a logic state low, no connection, and high.
When i·change· LCD_Power· to be LOW in the program RB.1 stays HIGH still.
Also im trying to have LCD_Power stay on for a second then turn off and remain off·i cannot for the life of me figure out how to do that.
Post Edited (infinkc) : 2/11/2007 1:25:11 AM GMT
Its hard to tell what is going on with out some idea of how your hooking the sx up.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Meh. Nothing here, move along.
This is what im trying to do:
-i have 3 momentary push buttons normally open connected to +5 so they go HIGH when pressed.
-inputting the 3 into RA.0, RA.1, RA.3
-1 momentary push botton normally open connected to GND so it gos LOW when pressed.
-inputting the 1 into RA.4
-RB.1 is my output. to an LED
I want the LED(RB.1) to go HIGH when any of the first 3 button are pressed, and if RA.4 is pressed i want RB.1 to go HIGH for ~3 seconds and turn off.
Also, you can simplify things by keeping all your buttons the same. Make all of them connect to ground (active-low), and then enable the onboard pull-ups to keep the inputs in the "off" state until a button is pressed. You can make active-low buttons look active-high with code.
(Updated program posted below)
Post Edited (JonnyMac) : 2/12/2007 9:23:58 PM GMT
Also, you can simplify things by keeping all your buttons the same. Make all of them connect to ground (active-low), and then enable the onboard pull-ups to keep the inputs in the "off" state until a button is pressed. You can make active-low buttons look active-high with code.
Im using an existing circuit that i have so i cant change the inputs.
Thanks!
·