The Godfather talking
Share your stuff or I will make you regret it.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 10, 2016, 11:18:10 23:18


Login with username, password and session length


Pages: [1]
Print
Author Topic: pisbasic serial help  (Read 1583 times)
0 Members and 1 Guest are viewing this topic.
Pikoko
Guest
« on: May 06, 2009, 10:39:15 22:39 »

Hi everyone.

last year i was making a serial device using pic basic pro and this year i wanna update it but im running into some issues.


i have a program that out puts strings of hex like so "FF 00 00 00 00 FF FF 00 00 00 00 FF" each hex is a channel from 1-12

i want the device to be able to read this.

i dont have a programmer anymore so iv been trying to use pic simulator IDE.

my question is.


Code:
SerialBuffer var BYTE[12]

SERIN2 rs232_in, 84 [wait(SerialBuffer)]

     if Serialbuffer[0] = 255 then
     high portb.7
     pause 200
     low portb.7
     endif

would that work for grabbing that whole string and storing it? is that also the right way to read them in an if statement?
Logged
falcon _bd
V.I.P
Active Member
*****
Offline Offline

Posts: 139

Thank You
-Given: 66
-Receive: 117


falconbd.com


WWW
« Reply #1 on: May 07, 2009, 09:26:45 09:26 »

Code:
SerialBuffer var BYTE[12]
SERIN2 rs232_in, 84 [wait(SerialBuffer)]

This line dont do anything.


Code:

EEphone var byte[14]

SerIn2 rxd,Baud,[wait("hello"), str eephone\14]

The line always wait for  "hello" .If it gets hello first then it will grab the next 14 byte in eephone
Logged

Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC