Notice
Assignment
Coding
Burning
Serial
Transmission
Sample
Codes
Applications
Resources |
PIC Micro-Controller Serial Transmission:
1. Connect your board to a serial cable
2. Make sure that the PICSTAR PLUS DEVICE PROGRAMMER window is
not open
3. Open SecureCRT or Hyper
Terminal, and make a new serial connection with the following
properties:
Protocal: Serial
Port: COM1
Baud Rate: 38400
Data Bits: 8
Parity: none
Stop Bits: 1
4. Connect
5. When you press your button on your board, you should see "HELLO
WORLD" or whatever you chose to write come up on the screen
at least once. If not, then it may have to do with your code more
than some other error. Make sure that you are using RS232 protocal,
not RS485, like Raffi's sample code.
A message from BB2 about connecting serial ports and stuff:
|
Date: Thu, 13 Nov 2003 03:36:02 -0500
From: Ben Buchwald <bb2@MIT.EDU>
Subject: Re: errata on the board design
It is a confusing situation. the ground pin is 5. the
transmit and recieve pins are 2 and 3, not 3 and 4 as orinally
in the plans. However, the layout on our boards is for a
female DB9 but we actually have a male. Not only does that
mean the pins are mirrored, but it means that tx and rx
are reversed (device side vs. host side issue). So not only
are the tx and rx pins shifted but also reversed which has
the effect of mirroring them, which, coincidentally the
footprint already is. Sometimes 3 wrongs do make a right,
it seems, almost.
IMPORTANT NOTE:
The use of male DB9 connectors on our boards makes them
a host, as is the computer. Therefor, for two hosts to talk
to each other, when you connect your board to the computer
serial port you must use a null-modem which crosses over
the transmit and recieve lines. This will be obvious because
a standard serial cable is female (host side) to male (device
side, like the PICStart). In 023, there is a null modem
cable on Raffi's workbench. It is a female to female cable
and the ends say "null modem" on them. If you
unplug the serial cable from the PICStart, you can plug
the two cables together. To connect to your board open up
SecureCRT with the COM1 profile with the correct baud rate
(if you don't trust the baud rate in the title, check the
preferences to make sure someone hasn't screwed around with
them). |
|