ok thanks alot...i would try these programs out either tomorrow or sometime else this week
ok thanks alot...i would try these programs out either tomorrow or sometime else this week
ok
well our instructor decided to change the school project to using serial instead of parallel communication
i am using pic code for the first time and im not sure how to get the pic to capture the input from the 8 switches and output it.
which ports on the pic do i use?
because when i was checking out the pic schematic, all the ports could be programmed ?!
how do u determine which ports to use and how would u modify the code that SuB-ZeRo gave me for serial?? (thank u very much for ur help SuB-ZeRo)
finally, how do u setup the baud rate??
let me explain
the pic takes the input from the switches and outputs to the serial port on the computer
if i setup the pc's com port to use a baud rate of 9600... how do i setup the pic to output at that baud rate?
please keep in mind, i have never used a pic before but that doesnt mean that u cant throw some moderate code at me... just that ill ask questions later!
thanks for all ur help
Last edited by naffets_23; - 16th July 2005 at 20:21.
yo dude are you sure it is to be done in picbasic? just double checking.
get a picbasic manual and read up on the serout and serin commands. itll give you syntax plus an example. it tells baud and other info
also, check out this site that shows how to serially communicate to a visual basic program and a pic. cool stuff.
http://www.rentron.com/VisualBasic.htm
also most of the code ideas above are just ideas dude, not to be copy and pasted into your project.
you use the ports that best suit your application. meaning dont use the anologue ports(if any) when there are free descrete ones. try and use some logic in choosing your ports. like, put all the buttons on one port and other devices on a different one or someting.
also, im not 100% but i think that you going to have to use a MAX232 or similar device to be able to comunicate wit the pc, not sure though. you can still generate serial data without one.
also need to wire your buttons up properly so there is no false triggering.
check out the schematics section of this forum. yo gonna need to take bits of data from different sources and add them together to suite your needs. its not all gonna be laid out in front of you.
Bookmarks