PDA

View Full Version : Serial Communication (PC to PIC)



Simon Brodeur
- 11th January 2006, 18:32
I have somes values to send to my PIC16F88 by the serial port.
I made a program with VB and it can be resumed like this :

1) I press a button
2) The string "5000" is sent, corresponding to the value of a scrollingbar

I try to read this by the pic as follow:

SERIN RXRS,T2400,["/"],Peri where Peri is a word

I got several bad or mismatched value. I then tought that the pic store in Peri a value of only one caracter. The value "5000" is composed of 4 caracter, which an only word cannot store. Am I right?

What should I write to the pic, using the SERIN, that will give me a value for Peri of 5000? Is there any processing I should do or I can use a modifier or something like that?

I also heard about binary transfert on VB...but I didn't understood.

----------------
Simon Brodeur
----------------

Simon Brodeur
- 11th January 2006, 18:41
Ops... I've just seen that for Serin2, the modifier DEC is all I need. But is there an alternative for Serin? I cannot use DEC with Serin....

----------------
Simon Brodeur
----------------

Simon Brodeur
- 11th January 2006, 18:55
After I looked the PB manual, I chose DEBUGIN, a command I never used (I always forget it).

Thanks you guy but for now I am still able to learn by myself...
But more question are to come...since I am on several other project.


--------------
Simon Brodeur
--------------