Question about how to use INA and OUTA
I understand that INA is a nibble that represents the current state of pins 0 - 3, and that OUTA will output on pins 0 - 3.
Can i use OUTA like this OUTA = 6 Store that in an outside memory chip
Then read it back from the memory test var = INA And get my 6 back as a binary 0110?
Do i have to put a binary number in OUTA? ie. OUTA = 0110
Basically for my final project I am trying to read data from an arithmatic logic unit(ALU) write it to memory, then read it later.
The address location and the read/write functionality is controlled by the stamp.
Here's the memory chip www.datasheet4u.com/share_search.php?sWord=TMS2114
And below is my program
Thanks for your help!
Post Edited (KraZe_EyE) : 11/12/2008 3:25:59 AM GMT
Can i use OUTA like this OUTA = 6 Store that in an outside memory chip
Then read it back from the memory test var = INA And get my 6 back as a binary 0110?
Do i have to put a binary number in OUTA? ie. OUTA = 0110
Basically for my final project I am trying to read data from an arithmatic logic unit(ALU) write it to memory, then read it later.
The address location and the read/write functionality is controlled by the stamp.
Here's the memory chip www.datasheet4u.com/share_search.php?sWord=TMS2114
And below is my program
Thanks for your help!
Post Edited (KraZe_EyE) : 11/12/2008 3:25:59 AM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i
I'm not sure what DIRA does; can I have a little example?
Thanks
but i cant be 100% SURE only 99%
computers do this with a speacial chip but i forget what it was
it just lets datat from in one direction or the other via an internal switch
i have a few but i dont know where they are to get you the numbers
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax posesses power beyond belief.
Believe in it.
Post Edited (Lab Rat) : 11/12/2008 10:12:13 PM GMT
thanks alot Mr. Green
I hope you guys can answer my n00b question cause this is the only thing holding project up.
I want to continously scan INA and display the result in a DEBUG statement, problem is I have the exit loop waiting for 'answer' to NOT = 0.
This screws it up because the stamp waits for me to input the 'answer' and therefore never refreshes the debug statement.
Any ideas? if this doesn;t make sense tell me and i'll try again
ReadWrite:
s1=1
s2=1
alu=0
PAUSE 10
DO
answer = 0
DEBUG CR,"Current ALU output is ", BIN5 INA, ", would you like to write ALU data to memory?",CR
DEBUG "0 for NO, 1 for YES",CR
DEBUGIN BIN1 answer
LOOP WHILE answer = 0
alu=1
IF answer = 1 THEN
GOTO careful
ELSE
GOTO main
ENDIF
RETURN