Searching \ for 'Serial communication' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/serials.htm?key=serial
Search entire site for: 'Serial communication'.

Truncated match.
PICList Thread
'serial communication'
1999\12\13@142401 by peter_teng

flavicon
face
All,

       Is there a sample application source code out there for serial port
communication between a PC and a PIC? Thanks in advance for any info.

best regards,
Peter Teng


'Serial communication'
2000\04\12@141649 by Saurabh Sinha
picon face
part 0 16 bytes
</x-html>

2000\04\12@145027 by Francisco Armenta

flavicon
face
part 0 1021 bytes content-type:text/x-vcard; charset=us-ascii; (decoded 7bit)

Proof you software (in the pc) for read the date from the PIC, you can
make this using a loop attach at the serial port.

for best undestanding i recommend to you the next url:

http://www.senet.com.au/~cpeacok

Francisco Armenta

{Quote hidden}

Content-Type: text/x-vcard; charset=us-ascii;
name="briones.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Francisco Armenta
Content-Disposition: attachment;
filename="briones.vcf"

Attachment converted: definition:briones.vcf (TEXT/CSOm) (0000E752)

2000\04\12@164535 by Thomas McGahee

flavicon
face
part 0 16 bytes
</x-html>

2000\04\13@042143 by James Wilson

flavicon
face
Should work if you have the right bit stream. I regularly send binary like
this.

James Wilson
http://www.geminidataloggers.com
{Original Message removed}

2000\04\13@052654 by chiptech

flavicon
face
Hi,

> I needed to establish communication between a PIC and a PC. I am sending
> bits serially at 9600 baud to Port-A. Someone told me that this is not going
> to work, and I should send ASCII characters to the PC as the PC stands ASCII
> characters. I don't understand this...could someone please explain or refer
> me to an URL...

For example if you are running hyperterminal on the PC and you have configured
the hyperterminal to communicate at 9600 N 8 1, the UART on the PC will look for
8 data bits between a start bit and a stop bit. If you are sending a bitstream
contineously, the first low bit in the bitstream will be taken as a start bit
and the next 8 bits will be decodes as a ASCII character. If the 10th bit in
your bitstream is low, framing error will be generated.

Saurabh, if you need more informaiton on RS232 data format, please send me a
private email and I will send you PDF file on RS232.

Regards

Pailoor

2000\04\13@101329 by Saurabh Sinha

picon face
> for best undestanding i recommend to you the next url:
>
> http://www.senet.com.au/~cpeacok
>

Seems there's something wrong with the URL...is this correct?

Thanks for your reply.

Regards,

Saurabh

{Original Message removed}

2000\04\13@101341 by Thomas McGahee

flavicon
face
 Saurabh,
 There is nothing to prevent you from sending data in pure binary/hex form.
 You can also send the data in some other representational form.

 For example, binary '10101011' is hex 'AB'. You could ascii-ize that to
 two ascii-coded bytes "A" and "B". Note that this representation can be
 easily "seen" in a program like hyperterminal, because it will be
 interpreted as the characters "A" and "B".

 Certain binary/hex data values would be interpreted by a program like
 hyperterminal as things like <carriage return> and <line feed>, and
 <ring that bell thing>. binary '00000111'  hex '07' is control-g which
 is interpreted as <ring that bell thing>. Send that and hyperterminal
 beeps (more like a grunt on my machine!). Send it as "0" and "7" and
 it just shows up as "07" on the screen.

 What is the best form to send in? Depends on whether you are primarily
 interested in speed, ability to view on hyperterminal, or some other criteria.
 The really really important thing is that both the sending program AND the
 receiving program know the protocol being used.

 For example, years ago I wrote a program that allowed two computers in
 different buildings to communicate packets of data back and forth. The
 communication lines could get very noisy, so we needed some way of
 verifying the data packets. So we came up with a protocol:
 Every packet begins with a carriage return and a line feed followed
 immediately by "*" which we called the synch character. Then there was
 a value from 0 to 255 expressed in ascii-ized hex such as "AF" which told
 how many bytes of data there were in the packet. This was followed by the
 data in ascii-ized hex form. This was followed by "**" and a checksum
 of only the data values. Upon successful reception of a data packet
 the receiver would sent a "we got it" acknowledge signal back
 to the sender.  The sender was waiting. If it got the acknowledge
 signal it began sending the next packet. If it did NOT receive
 an acknowledgement, OR if it received a "retry" code, it would
 re-send the previous packet.

 Now, because we coded everything in ascii-ized form it took us twice as long
 to send everything, BUT we could hang a dumb terminal on the line
 and actually WATCH the data packets coming over. It was visually
 easy to determine what kinds of problems we might be having. In fact,
 later we changed the protocol to send a <space> character between
 all data elements. That made the packets even easier to read
 on a dumb terminal. We traded off speed for the ability to easily
 troubleshoot problems.

 But you don't HAVE to do these kinds of things. There is nothing
 wrong with sending as much of the data in raw format as you can.
 I often use a simple synchronizing protocol that sends all the
 real data in pure binary form, but which synchronizes packets
 and keeps track of packet length and does checksums. To keep
 speed up these packets are often several kilobytes in size.
 When we get too many failed packets, we switch down to using a
 smaller packet size. When things look fine, we switch back
 to using larger packets. Such an adaptive program gives you
 the best of both worlds.

 You do what works best for your particular application.
 The PC and the PIC will "understand" whatever you have
 PROGRAMMED them to understand. Everything else will be gibberish.

 Fr. Tom McGahee

   {Original Message removed}

2000\04\13@111742 by Francisco Armenta

flavicon
face
part 0 1917 bytes content-type:text/x-vcard; charset=us-ascii; (decoded 7bit)

the new url is:
http://www.beyondlogic.org/

Francisco

Saurabh Sinha wrote:
{Quote hidden}

> {Original Message removed}

2000\04\13@114054 by artky1k

flavicon
face
Hey guy,

I've been deleting your messages for months now because of the
file attachments. I'm sure you have good things to say, but the
security risk from any file attachment is real and I delete them
without opening the messages unless it's information I requested.

You can certainly do as you so choose, but I know other people
who do this too-

Good Luck,


Art




On 13 Apr 00, at 10:22, Francisco Armenta wrote:

{Quote hidden}

> > {Original Message removed}

2000\04\13@130155 by Kris Wilk

flavicon
face
<x-flowed>What email client do you use? Any good email program will NEVER open an
attachment unless you explicitly want to. For instance in Eudora (what I'm
using), I see there is an attachment, I see an icon for it, and if I want
to, I can double-click it to run/open/view it. I'm free to read the text of
the email without even touching the attachment, which is what I usually do
unless it's just an image file or something equally harmless. EXEs usually
get trashed after I finish reading the text.

If your program just opens files on it's own, I'd shop for a new email
client, or look for an option that turns this 'feature' off.

Or do what a friend of mine does and read your email on a Mac, which is
impervious to attack from PC-borne virii, trojans, etc. :)

Kris Wilk
ReefNet Software
http://www.reefnet.on.ca

At 11:38 AM 4/13/00 , you wrote:
>Hey guy,
>
>I've been deleting your messages for months now because of the
>file attachments. I'm sure you have good things to say, but the
>security risk from any file attachment is real and I delete them
>without opening the messages unless it's information I requested.
>
>You can certainly do as you so choose, but I know other people
>who do this too-

</x-flowed>

2000\04\13@152632 by Saurabh Sinha

picon face
I am sorry if I have caused any inconvenience by sending the files. Often
these files have been .asm files, or .hex files. For your assurance I run an
updated [weekly] anti-virus, and also the files go thru' the IEEE server,
which also scans for viruses before receiving/sending.

Regards,

Saurabh


{Original Message removed}

2000\04\13@154505 by M. Adam Davis

flavicon
face
The attachment you are refering to is actually a VCard, which contains more
contact information.  This is a feature available in Netscape email, among
others.  It is not widely used, though it has been included in netscape
communicator for several years.

I understand your position, though.  I have taken a position of trusting certian
individuals, and filtering people rather than you method of trusting certian
emails and filtering messages(such as those with attachments).  Francisco is an
individual I trust, and so I don't worry about his attachment.  If I ever needed
to eneter into a business relationship with him it would be very convenient
indeed to click the button "Add Card to Address Book" rather than requsting and
entering the information myself.

-Adam

P.S.
For all of you who are sitting on their reply button about to help me understand
the evils of self-propogating virii which send themselves using a trusted
person's email address blah blah blah, please save your time, my time and the
piclist bandwidth.  I work in several capacities of a small business, one of
which is systems and network administrator, and I am well versed in wroking with
and dealing with virii and their various permutations.  While I made a blanket
statment above as to how I /generally/ treat email, I certianly have far more
complex rules and habits which have kept me virus free since eighty-three.

spam_OUTartky1kTakeThisOuTspamCTEL.NET wrote:
{Quote hidden}

2000\04\14@012458 by Gennette, Bruce

flavicon
face
PCs are dumb.  They have to be set up to accept certain size lumps of bits
(called bytes) as valid data at a certain speed - if you encode data in 7
bit ASCII and the PC is expecting 8 bit ASCII you'll get garbage - if you
send each bit in 1/56000 seconds when the PC is expecting each bit to take
1/2400 seconds to arrive you'll probable get nothing.

PCs don't just sit around waiting for bits to come in the serial port, they
have a special way of being signalled that bits are about to arrive.  I
think I've got the logic right in the following explaination, but not having
a technical ref in front of me I'll probable get it backwards (help from
experts accepted).

The line into the PC serial port *MUST* be held Hi by the external device to
indicate that the line is idle.  When the external device wants to send
something it toggles the data line from its mark state (Hi) to its space
state (Lo) for a specific time period - this is called a 'start bit'.
Immediately after the start bit each bit of the data byte is sent.  Another
time period in the idle state is added at the end of each byte, called a
'stop bit', then the whole thing has to be repeated for the next byte.

It is up to the programer to detect the start bit and each following data
bit in the byte.  Your detection should start about 1/3 to ¸ of a bit time
from the end of the start bit time to reliably sample the middle of each
bit.

Typical data comms uses 1 start bit, 8 data bits, (No parity) and 1 stop bit
for a total of 10 bits per byte sent.  The start and stop bits are always Hi
and allow re-synchronization if the timing is a little out.

Most comms programs will expect ASCII, but you could pack values into your
data, allow it to be captured as ASCII and then 'unpack' the bit patterns
from the ASCII characters.

Hope this clears up what you need to be doing.
Bye.

       {Original Message removed}

2000\04\14@052728 by Jan Lund

flavicon
face
Hi.

> PCs don't just sit around waiting for bits to come in the
> serial port, they
That is true, however if you enable interrupthandling in your software, all
you have to do is read the Rx-buffer. (and the error register, in order to
see if there where framing errors etc)

> It is up to the programer to detect the start bit and each
> following data
No - the UART does this. When the UART has recevied a byte it will fire an
interrupt (usually INT 3 or INT 4 depending on the COM-port you are using).
All you have to do is set up the UART to the correct speed, start/stop bits
etc. and hook the interrupt (DOS) to your ISR (interrupt service routine)

It is, however, possible to use a polling technique but that is more
processor time consuming. I would prefer the interrupt method at any time.

If you are programming in the Windows environment, there are plenty of
freeware serial com source around.

Here's some info on serial comm/uart :

http://www.beyondlogic.org/serial/serial.htm

Rgds

Jan

2000\04\14@063702 by Alan B Pearce

face picon face
>The line into the PC serial port *MUST* be held Hi by the external device to
>indicate that the line is idle.  When the external device wants to send
>something it toggles the data line from its mark state (Hi) to its space
>state (Lo) for a specific time period - this is called a 'start bit'.

The idle state (called Hi in the quote) is a negative voltage for RS232,
between -3 and -28 volts according to the standard. Most systems use -12 volts.
Because of other constraints in the standard, it is possible to use ground for
this level.

The start bit state (called Lo in the quote) is at a positive voltage between +3
and +28 volts. Again most systems use +12 volts.

>Typical data comms uses 1 start bit, 8 data bits, (No parity) and 1 stop bit
>for a total of 10 bits per byte sent.  The start and stop bits are always Hi
>and allow re-synchronization if the timing is a little out.

Wrong - the start and stop bits are opposite polarities. The stop bit is the
same polarity as the line idle state.

2000\04\19@032150 by Paul Anderson

flavicon
face
On Thu, 13 Apr 2000, Kris Wilk wrote:

>
> Or do what a friend of mine does and read your email on a Mac, which is
> impervious to attack from PC-borne virii, trojans, etc. :)
>
Or under Linux, which doesn't have virii.


---
Paul Anderson - Self-employed Megalomaniac
.....paulKILLspamspam@spam@geeky1.ebtech.net
http://zephyr.sellad.on.ca/~paul
"Well, that one threw the equipment into convulsions..."

2000\04\19@032210 by Paul Anderson

flavicon
face
On Thu, 13 Apr 2000 artky1kspamKILLspamctel.net wrote:

>
> I've been deleting your messages for months now because of the
> file attachments.
>
They aren't anything useful, just these .vcf's Netscape likes to attach to
outgoing e-mail if you don't disable it in the preferances.  They don't
contain any executable code at all, just info like address, e-mail
address, phone number, fax, etc.  Totally pointless clutter.


---
Paul Anderson - Self-employed Megalomaniac
.....paulKILLspamspam.....geeky1.ebtech.net
http://zephyr.sellad.on.ca/~paul

We the unwilling, led by the unknowing,
are doing the impossible for the ungrateful.
We have for so long done so much with so little
we are now qualified to do anything with nothing !

2000\04\19@110034 by M. Adam Davis

flavicon
face
Linux is not immune to virii, and I'm sure someone, somewhere is out there
working on one.

What linux does not have yet are inexperienced users who run any program that
comes along on email or from a web site, which Windows has in abundance.

-Adam

Paul Anderson wrote:
{Quote hidden}

2000\04\19@152930 by William Chops Westfield

face picon face
   What linux does not have yet are inexperienced users who run any
   program that comes along on email or from a web site, which
   Windows has in abundance.

What linux does not have yer are users who run any program that comes along
AS ROOT, which is pretty much the default state for windows.

On the other hand, given that there's a priviledged mode to unix, there are
no end of cracker programs distributed for the express purposes of getting
that priv, and hiding the fact that you got it.

The process of locating a suitable host, testing it for usable
vulnerabilities, exploiting one of those vulnerabilities to break in,
transferring the 'rootkit' software, building the software, installing and
configuring the software, starting it up, and exiting again, can be done
within about 30 seconds (according to reports from sources that should be
accurate.)

All the network attacks on yahoo/ebay/etc were from unix systems that had
been broken into, right?

Unix just breeds a different type of "inexperience", and different types
of attack.

BillW

2000\04\19@172049 by paulb

flavicon
face
M. Adam Davis wrote:

> What linux does not have yet are inexperienced users who run any
> program that comes along on email or from a web site, which Windows
> has in abundance.

 What Linux does not have yet is software written by M$ that executes
VB scripts willy-nilly without checking.
--
 Cheers,
       Paul B.

2000\04\20@003134 by Paul Anderson
flavicon
face
On Wed, 19 Apr 2000, William Chops Westfield wrote:

>
> All the network attacks on yahoo/ebay/etc were from unix systems that had
> been broken into, right?
>
UNIX systems that where run by incompetent system administrators.  A good
sysadmin would never allow that to happen, but the proliferation of NT has
given bosses the idea that any bozo can be an admin.  That just ain't
true.  System administration requires a lot of knowledge, skill and time.
It is not a part-time job.  It involves constant monitoring of CERT lists,
bug-traq, rootshell.com, l0pht, etc. to know what the latest holes are and
plug them immediately.

People who use these rootkits are called script-kiddies.  They generally
have no idea what they're doing, and rarely understand how to use UNIX(a
machine of mine has been broken into before by a script kiddie before I
tightened up the security, he tried a lot of DOS commands like dir,
format, etc. then gave up because the account he had gotten into had
minimal privileges).  All they're doing is following a step-by-step
manual, and they can only get into the least secured of systems.  I'd be
willing to bet that this kid, MafiaBoy, that successfully attacked yahoo,
ebay, etc. was using fraggle(DoS attack, all it does is bring the server
down - no real damage) and if you where to ask him the most basic of UNIX
questions he'd start drooling and shooting sparks.


---
Paul Anderson - Self-employed Megalomaniac
paulspamspam_OUTgeeky1.ebtech.net
http://zephyr.sellad.on.ca/~paul

"The RX-900 battleship can be used in two modes, PEACE and WAR.  When in PEACE
mode, the RX-900 is suitable for saving young children and bunny rabbits,
when set in WAR mode, it is capable of leveling New York in three seconds."

2000\04\20@102034 by vehasmaa.No.More.Spam

flavicon
face
"M. Adam Davis" wrote:
>
> Linux is not immune to virii, and I'm sure someone, somewhere is out there
> working on one.

Actually there is viruses for Linux, but only like five or so. Linux
really is not virus frendly enviroment, becouse all those privilege
leves, etc...

> What linux does not have yet are inexperienced users who run any program that
> comes along on email or from a web site, which Windows has in abundance.
>

Yes, and i hope that option never comes to linux email-programs.

J.M. Vehasmaa

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...