sx28 + Pink +example
hello,
a user of this forum AND, was looking for some more info about the sx program
a have made some comments into the sx file
if somebody else can also take a look into that program, and figure out why i have to make some strange programming when i want to receive some data
kurt
i can't upload the html file for the pink server
a user of this forum AND, was looking for some more info about the sx program
a have made some comments into the sx file
if somebody else can also take a look into that program, and figure out why i have to make some strange programming when i want to receive some data
kurt
i can't upload the html file for the pink server
Comments
interrupt bank isrMultiplex
inc isrmulti
mov w,isrmulti
jmp pc+w
jmp isrthread1
jmp isrthread2
You must alter the value in w to be either 0 or 1 (or jmp pc+w goes beyond jumptable)
interrupt bank isrMultiplex
inc isrmulti
mov w,isrmulti
and······· w,#1
jmp pc+w
jmp isrthread1
jmp isrthread2
Edit: sorry, didn't notice you reset isrmulti to 255 in thread2. That works too but takes more code.
regards peter
Post Edited (Peter Verkaik) : 4/12/2006 8:22:59 AM GMT
· call @get_byte ;received the byte from location "00"
mov cmd,byte
call @get_byte ;dummy for cls?? i don't know why , but this is working
mov w,#$00 ;same as the comment above
call @send_byte ;
you assume the pink only sends 1 byte after you send it the command !NB0R00
but the pink transmits all bytes from var00 up to a stored binary 0 (the CLS character).
So if var00 holds "dog",0 then 4 bytes are returned to the sx.
Actually, when no CLS is stored in var00, pink continues to send bytes from the
next variable and so on, until it encounters a binary 0.
You send a CLS character after you received·two bytes. I assume the CLS character
terminates the read command but I am not sure about that.
regards peter
·
yes i assume it only send 1 byte, because i block the string into the html file (size = 1).
but i don't know why i have to program it that way.
i send the read instruction for reading the var00 into the pink,
then i use a getbyte routine to received that byte,
and normally that should work, correct,
but it doesn't i have to program that way, and i don't know the logic of it
anybody understand way??
Kurt
then the sx receives N+1 characters when reading it,
or if it holds 1 character, the sx receives 2 characters,
the last character being the CLS character.
regards peter
but let say, the pink is sending "kurt",0
that equals 5 bytes (0 included)
if i only want to have the first byte "k", I don't care for the "urt",0 ,
i would just have to run only 1 time my get_byte routine, correct?
the pink will send first the 'k', which i have received with the get_byte, then continue the processing of that char, but the pink will send the rest anyway 'urt',0. which isn't needed for me to read.
i hope i am correct so far.
so why do i have to use more get_byte routines to get it working???
i am hope your understand what i mean,it isn't easy to explain
Kurt
byte receive flag (rx_flag) can be reset after you grab a byte
in the mainline code.
Just don't use the extra received bytes.
Edit:
It also allows you to synchronize with the pink.
Only after receiving the CLS, you may send another command
to the pink.
regards peter
Post Edited (Peter Verkaik) : 4/12/2006 1:52:21 PM GMT
thanks for the help.
any idea were i can find more info about creating text webpages??
i used lines from other examples
Kurt
http://home.hetnet.nl/~hans-kuipers/
Select HTML/CSS in the upper left corner.
You can online create several layouts.
Right-click in the layout window to show source.
regards peter
·
http://www.webdesignfromscratch.com/
regards peter
·