Revision: 1595
Author: [email protected]
Date: Fri Jan 15 20:48:12 2010
Log: serial port tutorial - work in progress, change title in serial_port_board, minor changes in getting_started
http://code.google.com/p/jallib/source/detail?r=1595

Added:
 /trunk/doc/dita/tutorials/images/serial_communication_16f877_pinout.JPG
 /trunk/doc/dita/tutorials/images/serial_communication_board_1.jpg
 /trunk/doc/dita/tutorials/images/serial_communication_board_2.jpg
 /trunk/doc/dita/tutorials/images/serial_communication_board_3.jpg
 /trunk/doc/dita/tutorials/images/serial_communication_cable.jpg
 /trunk/doc/dita/tutorials/images/serial_communication_pinout.jpg
 /trunk/doc/dita/tutorials/images/serial_communication_schematic.jpg
 /trunk/doc/dita/tutorials/images/serial_communication_usb.jpg
 /trunk/doc/dita/tutorials/tutorial_serial_communication.xml
Modified:
 /trunk/doc/dita/tutorials/tutorial_getting_started.xml
 /trunk/doc/dita/tutorials/tutorial_serial_port_board.xml

=======================================
--- /dev/null   
+++ /trunk/doc/dita/tutorials/images/serial_communication_16f877_pinout.JPG Fri Jan 15 20:48:12 2010
Binary file, no diff available.
=======================================
--- /dev/null   
+++ /trunk/doc/dita/tutorials/images/serial_communication_board_1.jpg Fri Jan 15 20:48:12 2010
Binary file, no diff available.
=======================================
--- /dev/null   
+++ /trunk/doc/dita/tutorials/images/serial_communication_board_2.jpg Fri Jan 15 20:48:12 2010
Binary file, no diff available.
=======================================
--- /dev/null   
+++ /trunk/doc/dita/tutorials/images/serial_communication_board_3.jpg Fri Jan 15 20:48:12 2010
Binary file, no diff available.
=======================================
--- /dev/null   
+++ /trunk/doc/dita/tutorials/images/serial_communication_cable.jpg Fri Jan 15 20:48:12 2010
Binary file, no diff available.
=======================================
--- /dev/null   
+++ /trunk/doc/dita/tutorials/images/serial_communication_pinout.jpg Fri Jan 15 20:48:12 2010
Binary file, no diff available.
=======================================
--- /dev/null   
+++ /trunk/doc/dita/tutorials/images/serial_communication_schematic.jpg Fri Jan 15 20:48:12 2010
Binary file, no diff available.
=======================================
--- /dev/null   
+++ /trunk/doc/dita/tutorials/images/serial_communication_usb.jpg Fri Jan 15 20:48:12 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/doc/dita/tutorials/tutorial_serial_communication.xml Fri Jan 15 20:48:12 2010
@@ -0,0 +1,39 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd" []>
+<topic id="template_id">
+  <title>Serial Port &amp; RS-232 for communication</title>
+  <prolog>
+    <author>Matthew Schinkel</author>
+    <publisher>Jallib Group</publisher>
+  </prolog>
+  <body>
+ <p id="firstcontent">In this tutorial we are going to learn how use TX &amp; RX pins for serial communication to your PC, and also learn communicate with another PIC or external device via RS-232.</p>
+    <section>
+      <title>What is a serial port?</title>
+ <p>You may have forgotten about this important part of history &quot;The serial port&quot;. You have forgotten because you have been too up-to-date on all the new technologies such as USB, Firewire, and Blue Tooth, but you have left the good old technologies in the past. Well, now it&apos;s time to put that funny looking port on the back of your PC to some good use! If you don&apos;t have a serial port on your PC, you can get a USB to serial converter/adapter.</p>
+      <image href="images/serial_communication_pinout.jpg"/>
+ <p>At one time, there where a wide range of devices that used the serial port such as a mouse, keyboard, a old GPS, modems and other networking.</p> + <p>In our case, we will use a serial port to send data to our PC, or to send data a second PIC. I find it most useful for troubleshooting my code, and for sending other readable information to my PC without the use of additional hardware such as a LCD. LCD&apos;s can be an expensive addition to your circuit.</p>
+    </section>
+    <section>
+      <title>What is RS-232?</title>
+ <p>RS-232 is the data transfer standard used on serial ports. Basically this is composed of one start bit, some data bits, and one or two stop bits. The transfer speed as well as the number of start, stop and data bits must match for both the transmitter and receiver. We will not need to cover the way in witch it is transferred since the PIC does it for us. We will only need to know the following: </p>
+      <p>1. The number of start bits (always 1)</p>
+      <p>2. The number of data bits (usually 8)</p>
+      <p>3. The number of stop bits (1 or 2)</p>
+      <p>4. The data transmission speed</p>
+ <p>You will be able to choose the transmission speed your self. The Jallib library we will be using will use 1 start bit, 8 data bits, and 1 stop bit. Your other device, such as your PC will also need to know this information.</p>
+    </section>
+ <section><title>What do I need?</title>In the first part of this tutorial I will show you how to hook your serial port up to your PC. I will show you how to connect it to another PIC later on in this tutorial. I feel that connectivity to your PC is quite important. You will need:<p>1. A PIC that has TX and RX Pin names. Most PIC&apos;s have them. Check your pinout diagram in the PIC&apos;s datasheet.</p><image href="images/serial_communication_16f877_pinout.JPG"/><p>2. A serial port board. You can buy one on the net, or build your own. <xref href="tutorial_serial_port_board.xml">See Here</xref> for more information. A serial port board is needed for voltage conversion. Serial ports output voltages up to 12v and go lower then 0v.</p><image href="images/serial_communication_board_1.jpg"/><image href="images/serial_communication_board_2.jpg"/><image href="images/serial_communication_board_3.jpg"/><p>3. A regular RS-232 Cable (make sure it is not a null modem cable, they look the same). You can check what type of cable you have with your multimeter. Put your multimeter on each pin of your cable starting with pin 1. Check for a zero ohm reading. This will check that the pins are the same at both ends. Null modem cables have some pins crossed.</p><image href="images/serial_communication_cable.jpg"/><image href="images/serial_communication_usb.jpg"/></section>
+    <section>
+      <title>Build your circuit</title>
+ <p>The circuit will be quite simple, you can take your blink a led circuit, and attach your serial port board. Here&apos;s a schematic with 16F877. We will be using the TX and RX pins:</p> + <image href="images/serial_communication_schematic.jpg" width="500" otherprops="clickable"/> + <p>When If your circuit doesn&apos;t work when you test it, your serial port board may have TX and RX switched. You can try to switch the two pins around.</p>
+    </section>
+    <section>
+      <title>Write your code</title>
+ <p>Since this is one of the first circuits you will be building, lets continue with your code from &quot;Blink a led&quot;. We will modify it to send data to your PC.</p>
+    </section>
+  </body>
+</topic>
=======================================
--- /trunk/doc/dita/tutorials/tutorial_getting_started.xml Sun Nov 22 11:01:49 2009 +++ /trunk/doc/dita/tutorials/tutorial_getting_started.xml Fri Jan 15 20:48:12 2010
@@ -1,5 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
+<!-- This document was created with Syntext Serna Free. -->
+<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd" []>
 <topic id="template_id">
   <title>Getting Started</title>
   <prolog>
@@ -81,15 +82,15 @@
               <entry>$5.01</entry>
             </row>
             <row>
-              <entry>12F675</entry>
+              <entry>12F88</entry>
               <entry>$1.83</entry>
             </row>
             <row>
-              <entry>18F452</entry>
+              <entry>18F675</entry>
               <entry>$1.01</entry>
             </row>
             <row>
-              <entry>18F4550</entry>
+              <entry>18F452</entry>
               <entry>$4.14</entry>
             </row>
             <row>
=======================================
--- /trunk/doc/dita/tutorials/tutorial_serial_port_board.xml Fri Nov 27 21:27:18 2009 +++ /trunk/doc/dita/tutorials/tutorial_serial_port_board.xml Fri Jan 15 20:48:12 2010
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='UTF-8'?>
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd" []>
 <topic id="topic-1">
-  <title>Building a max232 circuit for serial port communication</title>
+  <title>Building a serial port borad with the max232 device</title>
   <prolog>
     <author>Matthew Schinkel</author>
     <publisher>Jallib Group</publisher>
@@ -30,6 +30,7 @@
     <section>
<p>Great job, now connect the RX and TX pins to your circuit, and plug the rs232 port directly your pc, or to a usb-to-serial adapter, or even to a bluetooth-to-serial adapter for short range wireless.</p> <p>I strongly suggest you make this on a PCB with pins that will plug to your breadboard. you’ll use it a lot!</p> + <p>In this image, I did not complete my PIC circuit, but I think you get the idea:</p>
       <p><image href="images/serialboard_serial-board.jpg"/></p>
<p>You can use serial_hardware lib or serial_software lib to transmit data to your pc, check for it in the other jallib projects. I suggest the software realterm for sending/receiving data to your PIC</p>
       <p>Open Source REALTERM http://realterm.sourceforge.net/
-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.


Reply via email to