Serin/Serout
Guido
Posts: 195
I would really appreciate some help with Serin/Serout. I have actually been able to get a Slave stamp running a clock and been able to access all information back to the master.....We I decided to explore adding another Slave Stamp with temperature using a DS1620. Here is my problem. How to you generate a Serin/Serout statement for the following. And I hope it is possible to add more slaves like in Jon's articile of Stamp to Stamp...
Here is the statement that I am having trouble with:
DEBUG REP "-"\TEMPF.BIT15,DEC TEMPF/10,".",DEC1 TEMPF," F ",CR
I realalize this is a debug statement, but anyway I try I can not get anything to work using serin/serout. As a matter of fact it is having an effect of the working clock program....
Still Learning
Guido
Here is the statement that I am having trouble with:
DEBUG REP "-"\TEMPF.BIT15,DEC TEMPF/10,".",DEC1 TEMPF," F ",CR
I realalize this is a debug statement, but anyway I try I can not get anything to work using serin/serout. As a matter of fact it is having an effect of the working clock program....
Still Learning
Guido
Comments
what exactly is it doing?
what exectly do you want to do?
should you just be sending data from the slave to the master and formatting it in the master?
more info please.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ
Let's try this again! The problem I seem to be having is when I connect the second slave stamp to the master...it will display correctly for a few seconds and then get very jittery and then ALL the data starts changing.
SERIN SIOPIN\FCPIN,T2400,[noparse][[/noparse]DAY,MONTH,DATE,YEAR,HOURS,DEC3 TEMPF,DEC3 TL, DEC3 TH]
I have put a delay after the serin but no help there....any ideas what I might try.
Again the first slave is just a clock and the second slave is temperature....trying to start out small, but have trouble right now
Thank You
or are the on seperate pins?
maybe you should put some sort of wait command in there and when each on sends data there will be a start of data identifier like WAIT"X"
they could be sending or receive before they are both ready
I see you have fcpin are you using flow control?
what stamps are you using?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ
I have a delay added to after the serin statement, but it really seems that when it is displaying clock the temperature display goes nuts and visa versa. Should I use two seperate serin statements?
I am using bs2,bs2p and bs2pe
What you want to have happen is the 'reciever' sits in a SERIN statement, waiting for data. Then when the 'sender' sends a SEROUT, the reciever gets all of it.
If the reciever starts its SERIN in the middle of the sender's SEROUT, then it will get garbled data.
So you need some time between the 'senders' sends, so the reciever has some time to get to its next SERIN statement.
Also -- the "T2400" is a BS1 constant, NOT a BS2/2e/2p constant.· You probably should read the manual on the SEROUT statement to find the right constants for the BS2, BS2e, and BS2p -- they are different.· You then must add the correct modifier (I think it's the "Open Baud Mode" modifier) to use the "open-collector" mode.
You also must do some planning to insure that two 'senders' dont' try to send at the same time.· This may not be an issue for you.
Post Edited (allanlane5) : 3/8/2005 2:03:04 PM GMT
I think more specifics about YOUR circuit are necessary before anyone can give more useful advice.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...
your looking more at a chip select type of network
you are going to have to do some playing around to get it all right
because once the mater sends the ok then the slave will run its program to get either time or temp then send the data to the master. once the master is satisfied it will then do the same for the other slave.
thats only one way to do it there are many other way you could do it
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ
Post Edited (kb2hap) : 3/8/2005 5:10:12 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...
what do ya think guido what do you feel most comfy with
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ
Thanks Again
Probably be back, but I am having fun thanks to all of you!
Thanks Again Everyone......
Watch Out Guido will be attempting to use a remote eprom for saving Data...oh boy will I need help!!!! First of all I hope the heck you can write and read be addressable?
Thanks Again
Guido