Revision: 1343
Author: sebastien.lelong
Date: Fri Sep 25 13:30:54 2009
Log: DITA customization
http://code.google.com/p/jallib/source/detail?r=1343
Added:
/trunk/doc/dita/tutorials/images/logo.jpg
Modified:
/trunk/doc/dita/tutorials/tutorial_gp2d02.xml
/trunk/doc/dita/tutorials/tutorial_i2c1.xml
/trunk/doc/dita/tutorials/tutorial_i2c2.xml
/trunk/doc/dita/tutorials/tutorial_i2c3.xml
/trunk/doc/dita/tutorials/tutorial_lcd.xml
/trunk/doc/dita/tutorials/tutorial_pwm1.xml
/trunk/doc/dita/tutorials/tutorial_pwm2.xml
/trunk/doc/dita/tutorials/tutorials.ditamap
/trunk/doc/dita/tutorials/tutorials.pdf
=======================================
--- /dev/null
+++ /trunk/doc/dita/tutorials/images/logo.jpg Fri Sep 25 13:30:54 2009
Binary file, no diff available.
=======================================
--- /trunk/doc/dita/tutorials/tutorial_gp2d02.xml Tue Sep 22 07:13:08 2009
+++ /trunk/doc/dita/tutorials/tutorial_gp2d02.xml Fri Sep 25 13:30:54 2009
@@ -1,17 +1,14 @@
<?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="topic_gp2d02">
<title>Interfacing a Sharp GP2D02 IR ranger</title>
- <abstract>Sharp IR rangers are widely used out there. There are many
different references, depending on the beam pattern, the minimal and
maximal distance you want to be able to get, etc... The way you got results
also make a difference: either <b>analog</b> (you'll get a voltage
proportional to the distance), or <b>digital</b> (you'll directly get
a digital value). This nice article will explain these details (and now I
know GP2D02 seems to be discontinued...)</abstract>
<prolog>
<author>Sébastien Lelong</author>
<publisher>Jallib Group</publisher>
- <copyright>
- <copyryear year="2009"/>
- <copyrholder>Jallib Group</copyrholder>
- </copyright>
</prolog>
<body>
+ <p>Sharp IR rangers are widely used out there. There are many
different references, depending on the beam pattern, the minimal and
maximal distance you want to be able to get, etc... The way you got results
also make a difference: either <b>analog</b> (you'll get a voltage
proportional to the distance), or <b>digital</b> (you'll directly get
a digital value). This nice article will explain these details (and now I
know GP2D02 seems to be discontinued...)</p>
<section>
<title>Overview of GP2D02 IR ranger</title>
<p>GP2D02 IR ranger is able to measure distances between approx.
10cm and 1m. Results are available as digital values you can access through
a dedicated protocol. One pin, Vin, will be used to act on the ranger.
Another pin, Vout, will be read to determine the distance. Basically,
getting a distance involves the following:</p>
@@ -86,7 +83,6 @@
<title>Testing (and the video)</title>
<p>Time to test this nice circuit ! Power the whole, and check no
smoke is coming from the PIC or (and) the ranger. Now get an object, like
you hand, more or less closed to the ranger and observe the LED, or the
serial output... Sweet !</p>
<p><xref href="http://www.youtube.com/watch?v=l5AZwv7LzyM"
format="html">http://www.youtube.com/watch?v=l5AZwv7LzyM</xref></p>
- <p><i>Sébastien Lelong</i></p>
</section>
</body>
</topic>
=======================================
--- /trunk/doc/dita/tutorials/tutorial_i2c1.xml Mon Sep 21 11:50:29 2009
+++ /trunk/doc/dita/tutorials/tutorial_i2c1.xml Fri Sep 25 13:30:54 2009
@@ -1,19 +1,14 @@
<?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="topic-1">
<title>Building an i2c slave with jallib (part 1)</title>
- <abstract>
- <p><xref href="http://en.wikipedia.org/wiki/I2c"
format="html">i2c</xref> is a nice protocol: it is quite fast, reliable,
and most importantly, it's addressable. This means that on a single
2-wire bus, you'll be able to plug up to 128 devices using 7bits
addresses, and even 1024 using 10bits address. Far enough for most usage...
I won't cover i2c in depth, as there are <xref
href="http://www.google.com/search?q=i2c" format="html">plenty
resources</xref> on the Web (and I personally like <xref
href="http://www.esacademy.com/faq/i2c/index.htm" format="html">this
page</xref>).</p>
- </abstract>
<prolog>
<author>Sébastien Lelong</author>
<publisher>Jallib Group</publisher>
- <copyright>
- <copyryear year="2009"/>
- <copyrholder>Jallib Group</copyrholder>
- </copyright>
</prolog>
<body>
+ <p><xref href="http://en.wikipedia.org/wiki/I2c"
format="html">i2c</xref> is a nice protocol: it is quite fast, reliable,
and most importantly, it's addressable. This means that on a single
2-wire bus, you'll be able to plug up to 128 devices using 7bits
addresses, and even 1024 using 10bits address. Far enough for most usage...
I won't cover i2c in depth, as there are <xref
href="http://www.google.com/search?q=i2c" format="html">plenty
resources</xref> on the Web (and I personally like <xref
href="http://www.esacademy.com/faq/i2c/index.htm" format="html">this
page</xref>).</p>
<section>
<title>A few words before getting our hands dirty...</title>
<p>i2c is found in many chips and many modules. Most of the time,
you create a master, like when accessing an EEPROM chip. This time, in this
three parts tutorial, we're going to build a slave, which will thus
respond to master's requests.</p>
@@ -34,7 +29,6 @@
<note><b>jallib currently supports up to 128 devices on a i2c
bus</b>, using 7-bits long addresses (without the 8th R/W bits).
There's currently no support for 10-bits addresses, which would give
1024 devices on the same bus. If you need it, please let us know,
we'll modify libraries as needed !</note>
<p>OK, enough for today. Next time, we'll see how two PICs must
be connected for i2c communication, and we'll check the i2c bus is
fully working, before diving into the implementation.
</p>
- <p><i>Sébastien Lelong</i></p>
</section>
</body>
</topic>
=======================================
--- /trunk/doc/dita/tutorials/tutorial_i2c2.xml Thu Sep 24 10:04:37 2009
+++ /trunk/doc/dita/tutorials/tutorial_i2c2.xml Fri Sep 25 13:30:54 2009
@@ -1,19 +1,14 @@
<?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="topic-1">
<title>Building an i2c slave with jallib (part 2)</title>
- <abstract>
- <p>In <xref href="tutorial_i2c1.xml">previous tutorial</xref>, we saw
a basic overview of how to implement an i2c slave, using a finite state
machine implementation. Today, we're going to get our hands a little
dirty, and starts connecting our master/slave together.</p>
- </abstract>
<prolog>
<author>Sébastien Lelong</author>
<publisher>Jallib Group</publisher>
- <copyright>
- <copyryear year="2009"/>
- <copyrholder>Jallib Group</copyrholder>
- </copyright>
</prolog>
<body>
+ <p>In <xref href="tutorial_i2c1.xml">previous tutorial</xref>, we saw
a basic overview of how to implement an i2c slave, using a finite state
machine implementation. Today, we're going to get our hands a little
dirty, and starts connecting our master/slave together.</p>
<section>
<title>Checking the hardware and the i2c bus... </title>
<p>First of all, i2c is quite hard to debug, especially if you
don't own an oscilloscope (like me). So you have to be accurate and
rigorous. That's why, in this second part of this tutorial, we're
going to setup the hardware, and just make sure the i2c bus is properly
operational.</p>
@@ -81,7 +76,6 @@
<p>On this next video, I've removed the pull-ups resistors, and
it doesn't work anymore (slave doesn't high speed blink its
LED).</p>
<p><xref href="http://www.youtube.com/watch?v=cNK_cCgWctY"
format="html">http://www.youtube.com/watch?v=cNK_cCgWctY</xref></p>
<p>Next time (and last time on this topic), we'll see how to
implement the state machine using jallib, defining callback for each
states.</p>
- <p><i>Sébastien Lelong</i></p>
</section>
</body>
</topic>
=======================================
--- /trunk/doc/dita/tutorials/tutorial_i2c3.xml Thu Sep 24 10:04:37 2009
+++ /trunk/doc/dita/tutorials/tutorial_i2c3.xml Fri Sep 25 13:30:54 2009
@@ -1,23 +1,18 @@
<?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="topic-1">
<title>Building an i2c slave with jallib (part 3)</title>
- <abstract>
- <p>In previous parts of this tutorial, we've seen a little of
theory, we've also seen how to check if the i2c bus is operational,
now the time has come to finally build our i2c slave. But what will slave
will do ? For this example, slave is going to do something amazing:
it'll echo received chars. Oh, I'm thinking about something more
exciting: it will "almost" echo chars:<ul>
- <li>if you send "a", it sends "b"</li>
- <li>if you send "b", it sends "c"</li>
- <li>if you send "z", it sends "{"<fn>why
"{" ? According to ASCII, "z" is the character for
position 122. 123 is... "{")</fn></li>
- </ul></p>
- </abstract>
<prolog>
<author>Sébastien Lelong</author>
<publisher>Jallib Group</publisher>
- <copyright>
- <copyryear year="2009"/>
- <copyrholder>Jallib Group</copyrholder>
- </copyright>
</prolog>
<body>
+ <p>In previous parts of this tutorial, we've seen a little of
theory, we've also seen how to check if the i2c bus is operational,
now the time has come to finally build our i2c slave. But what will slave
will do ? For this example, slave is going to do something amazing:
it'll echo received chars. Oh, I'm thinking about something more
exciting: it will "almost" echo chars:<ul>
+ <li>if you send "a", it sends "b"</li>
+ <li>if you send "b", it sends "c"</li>
+ <li>if you send "z", it sends "{"<fn>why
"{" ? According to ASCII, "z" is the character for
position 122. 123 is... "{")</fn></li>
+ </ul></p>
<p/>
<section>
<title>Building the i2c master</title>
@@ -170,6 +165,5 @@
<p>i2c is a widely used protocol. Most of the time, you access i2c
devices, acting as a master. We've seen how to be on the other side,
on the slave side. Being on the slave side means you can build modular
boards, accessible with a standard protocol. For instance, I've built
a <xref href="http://sirbot.org/sirbot-modules/dc-motor-controller-board"
format="html">DC motor controller</xref> daughter board using this.
It's a module, a unit on its own, just plug, and send/receive data,
with just two wires.</p>
<p>And I also plan to build a LCD controller board, but that's
for another "Step by Step" post :)<fn>and actually this LCD
controller was being built by Jallib guys (Joep, Albert, Richard, Rob), and
known as "LCD interface" project. See <xref
href="http://code.google.com/p/jallib/source/browse/#svn/trunk/project/lcd_interface"
format="html">here</xref> for more.</fn></p>
</section>
- <p><i>Sébastien Lelong</i></p>
</body>
</topic>
=======================================
--- /trunk/doc/dita/tutorials/tutorial_lcd.xml Thu Sep 24 10:04:37 2009
+++ /trunk/doc/dita/tutorials/tutorial_lcd.xml Fri Sep 25 13:30:54 2009
@@ -1,19 +1,14 @@
<?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="topic-1">
<title>Interfacing a HD44780-compatible LCD display</title>
- <abstract>
- <p>In this "Step by Step" tutorial, we're going to
(hopefully) have some fun with a LCD display. Particularly one compatible
with HD44780 specifications, which seems to be most widely used.</p>
- </abstract>
<prolog>
<author>Sébastien Lelong</author>
<publisher>Jallib Group</publisher>
- <copyright>
- <copyryear year="2009"/>
- <copyrholder>Jallib Group</copyrholder>
- </copyright>
</prolog>
<body>
+ <p>In this "Step by Step" tutorial, we're going to
(hopefully) have some fun with a LCD display. Particularly one compatible
with HD44780 specifications, which seems to be most widely used.</p>
<section>
<title>Setting up the hardware</title>
<p>As usual, there are <xref
href="http://www.google.com/search?hl=en&q=lcd+hd44780"
format="html">plenty resources</xref> on the web. I found <xref
href="http://home.iae.nl/users/pouweha/lcd/lcd.shtml" format="html">this
one</xref> quite nice, covering lots of thing. Basically, LCDs can be
accessed with two distinct interfaces: <i>4-bit or 8-bit interfaces</i>.
<i>4-bit interface requires less pins</i> (4 pins), but is somewhat slow,
<i>8-bit interface requires more pins</i> (8 pins) but is faster. jallib
comes with the two flavors, it's up to you deciding which is most
important, but usually, pins are more precious than speed, particularly
when using a 16F88 which only has 16 I/O pins (at best). Since 4-bit
interface seems to be most used, and we'll use this one here...</p>
@@ -116,6 +111,5 @@
<p>Here's the video !</p>
<p><xref href="http://www.youtube.com/watch?v=hIVMuaz8OS8"
format="html">http://www.youtube.com/watch?v=hIVMuaz8OS8</xref></p>
</section>
- <p><i>Sébastien Lelong</i></p>
</body>
</topic>
=======================================
--- /trunk/doc/dita/tutorials/tutorial_pwm1.xml Mon Sep 21 11:50:29 2009
+++ /trunk/doc/dita/tutorials/tutorial_pwm1.xml Fri Sep 25 13:30:54 2009
@@ -1,19 +1,14 @@
<?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="topic-1">
<title>Having fun with PWM and a LED (part 1)</title>
- <abstract>
- <p>In this "Step-by-Step" tutorial, we're going to (try
to) have some fun with PWM. PWM stands for <xref
href="http://en.wikipedia.org/wiki/PWM" format="html">Pulse Width
Modulation</xref>, and is quite weird when you first face this (this was at
least my first feeling).</p>
- </abstract>
<prolog>
<author>Sébastien Lelong</author>
<publisher>Jallib Group</publisher>
- <copyright>
- <copyryear year="2009"/>
- <copyrholder>Jallib Group</copyrholder>
- </copyright>
</prolog>
<body>
+ <p><xref href="http://en.wikipedia.org/wiki/PWM" format="html">Pulse
Width Modulation</xref>In this "Step-by-Step" tutorial,
we're going to (try to) have some fun with PWM. PWM stands for , and
is quite weird when you first face this (this was at least my first
feeling).</p>
<section>
<title>So, how does PWM look like ?...</title>
<p>PWM is about switching one pin (or more) high and low, at
different frequencies and duty cycles. This is a on/off process. You can
either vary:<ul>
@@ -101,6 +96,5 @@
<title>"I wanna try, where are the files ?"</title>
<p>To run this sample, you'll need the <xref
href="http://code.google.com/p/jallib/downloads/list" format="html">last
jallib pack</xref> (at least 0.2 version). You'll also find the exact
code we used <xref
href="http://code.google.com/p/jallib/source/browse/trunk/doc/dita/tutorials/code/blog_16f88_board_sl_pwm_led.jal"
format="jal">here</xref>.</p>
</section>
- <p><i>Sébastien Lelong</i></p>
</body>
</topic>
=======================================
--- /trunk/doc/dita/tutorials/tutorial_pwm2.xml Mon Sep 21 11:50:29 2009
+++ /trunk/doc/dita/tutorials/tutorial_pwm2.xml Fri Sep 25 13:30:54 2009
@@ -1,20 +1,15 @@
<?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="topic-1">
<title>Having fun with PWM and a piezo buzzer (or a speaker) (part
2)</title>
- <abstract>
- <p>In <xref href="tutorial_pwm1.xml">previous tutorial</xref>, we had
fun by controlling the brightness of a LED, using PWM. This time,
we're going to have even more fun with a <i>piezo buzzer</i>, or a
small <i>speaker</i>.</p>
- <p>If you remember, with PWM, you can either vary the <b>duty
cycle</b> or the <b>frequency</b>. Controlling the brightness of a LED, ie.
produce a variable voltage on the average, can be done by having a
<i>constant frequency</i> (high enough) and <i>vary the duty cycle</i>.
This time, this will be the opposite: we'll have a constant duty
cycle, and vary the frequency.</p>
- </abstract>
<prolog>
<author>Sébastien Lelong</author>
<publisher>Jallib Group</publisher>
- <copyright>
- <copyryear year="2009"/>
- <copyrholder>Jallib Group</copyrholder>
- </copyright>
</prolog>
<body>
+ <p>In <xref href="tutorial_pwm1.xml">previous tutorial</xref>, we had
fun by controlling the brightness of a LED, using PWM. This time,
we're going to have even more fun with a <i>piezo buzzer</i>, or a
small <i>speaker</i>.</p>
+ <p>If you remember, with PWM, you can either vary the <b>duty
cycle</b> or the <b>frequency</b>. Controlling the brightness of a LED, ie.
produce a variable voltage on the average, can be done by having a
<i>constant frequency</i> (high enough) and <i>vary the duty cycle</i>.
This time, this will be the opposite: we'll have a constant duty
cycle, and vary the frequency.</p>
<section>
<title>What is a piezo buzzer ? </title>
<p>It's a "component" with a material having
<i>piezoelectric</i> ability. <xref
href="http://en.wikipedia.org/wiki/Piezoelectricity"
format="html">Piezoelectricity</xref> is the ability for a material to
produce voltage when it get distorted. The reverse is also true: <i>when
you produce a voltage, the material gets distorted</i>. When you stop
producing a voltage, it gets back to its original shape. If you're
fast enough with this on/off voltage setting, then <i>the piezo will start
to oscillate</i>, and will <b>produce sound</b>. How sweet...</p>
@@ -65,6 +60,5 @@
<title>"Where can I download the files ?"</title>
<p>As usual, you'll need the <xref
href="http://code.google.com/p/jallib/downloads/list" format="html">last
jallib pack</xref> (at least 0.2 version). You'll also find the exact
code we used <xref
href="http://code.google.com/p/jallib/source/browse/trunk/doc/dita/tutorials/code/blog_16f88_pwm_sound.jal"
format="jal">here</xref>.</p>
</section>
- <p><i>Sébastien Lelong</i></p>
</body>
</topic>
=======================================
--- /trunk/doc/dita/tutorials/tutorials.ditamap Thu Sep 24 10:04:37 2009
+++ /trunk/doc/dita/tutorials/tutorials.ditamap Fri Sep 25 13:30:54 2009
@@ -3,17 +3,20 @@
<bookmap id="bookmap_tutorials">
<booktitle>
<mainbooktitle>The Tutorial Book</mainbooktitle>
- <booktitlealt>Have fun with PIC microcontrollers, Jal v2 and
Jallib</booktitlealt>
+ <booktitlealt><image placement="break" href="images/logo.jpg"
width="300"/>Have fun with PIC microcontrollers, Jal v2 and
Jallib</booktitlealt>
</booktitle>
<bookmeta>
- <author>Sébastien Lelong</author>
<bookrights>
<copyrfirst>
- <year>2009</year>
+ <year>2008</year>
</copyrfirst>
+ <copyrlast>
+ <year>2009</year>
+ </copyrlast>
<bookowner>
<organization>Jallib Group</organization>
</bookowner>
+ <summary>Step by step tutorials, covering basic features of PIC
microcontrollers, using jalv2 compiler and jallib libraries.</summary>
</bookrights>
</bookmeta>
<frontmatter>
=======================================
--- /trunk/doc/dita/tutorials/tutorials.pdf Thu Sep 24 10:04:37 2009
+++ /trunk/doc/dita/tutorials/tutorials.pdf Fri Sep 25 13:30:54 2009
File is too large to display a diff.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---