<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-2058</id>
	<title>Nabble - MicroControllers - hc12</title>
	<updated>2009-11-23T13:24:49Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/MicroControllers---hc12-f2058.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MicroControllers---hc12-f2058.html" />
	<subtitle type="html">Freescale HC12 MicroController User Group.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26486137</id>
	<title>Re: HCS12 to HCS12 Port interfacing</title>
	<published>2009-11-23T13:24:49Z</published>
	<updated>2009-11-23T13:24:49Z</updated>
	<author>
		<name>Michael-465</name>
	</author>
	<content type="html">I think the resistor is in case you accidentally configure both ports as output and drive them at opposite levels, thereby creating a short circuit. &amp;nbsp;A resistor would limit the current and protect your port pin.
&lt;br&gt;&lt;br&gt;I have connected 2 MCUs many times but I always use the SPI bus. &amp;nbsp;the HC12 has 3 so you have plenty to choose from. &amp;nbsp;It's easy to use and allows you to exchange 1 byte at a time bi-directionally. &amp;nbsp;It's like a bi-directional shift register.
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;--- In &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486137&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;, Jerry Fields &amp;lt;electronic_tech1@...&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; I have two MC9S12DP512 microcontrollers, and I need to interface them. &amp;nbsp;The first mc9s12, has port P set to output, the second mc9s12 has port T set to input, and I want to connect one line on those ports. There are no large amounts of data being sent, as I am just holding the line high or low. My question is, do I need a current limiting resistor in between the two? I have not yet found the documentation that shows me the internal circuitry configurations of the ports. If somebody could point me to that, or give me a yea or nay on the resistor, that would be great! Or you can just tell me not to be lazy, and figure it out myself! lol It would be great to hear what a few of you have to say though. Seems like I remember seen a open collector configuration on my old HC11. I must have been looking at port B (that was output only)!
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Thanks in advance everyone! This is a GREAT yahoo group!
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Jerry Fields 		 	 &amp;nbsp; 		 &amp;nbsp;
&lt;br&gt;&amp;gt; _________________________________________________________________
&lt;br&gt;&amp;gt; Hotmail: Trusted email with powerful SPAM protection.
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://clk.atdmt.com/GBL/go/177141665/direct/01/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://clk.atdmt.com/GBL/go/177141665/direct/01/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/HCS12-to-HCS12-Port-interfacing-tp26485498p26486137.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26485972</id>
	<title>RE: HCS12 to HCS12 Port interfacing</title>
	<published>2009-11-23T13:13:34Z</published>
	<updated>2009-11-23T13:13:34Z</updated>
	<author>
		<name>justin lucas</name>
	</author>
	<content type="html">&lt;br&gt;You could always configure the SCI ports. &amp;nbsp;That would eliminate the concern to use a resistor.
&lt;br&gt;&lt;br&gt;We did something like this during our lab using the HC12 board and a HC11. &amp;nbsp;
&lt;br&gt;&lt;br&gt;The instructor said to use a resistor if you port to port, he didn't explain the why or I didn't catch it.
&lt;br&gt;&lt;br&gt;We did the SCI ports which was more of a challenge, but freed up extra ports we were using on the HC11.
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;Good luck
&lt;br&gt;&lt;br&gt;&lt;br&gt;Justin
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26485972&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68hc12@...&lt;/a&gt;
&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26485972&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;electronic_tech1@...&lt;/a&gt;
&lt;br&gt;Date: Mon, 23 Nov 2009 15:45:05 -0500
&lt;br&gt;Subject: [68HC12] HCS12 to HCS12 Port interfacing
&lt;br&gt;&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Hello,
&lt;br&gt;&lt;br&gt;I have two MC9S12DP512 microcontrollers, and I need to interface them. The first mc9s12, has port P set to output, the second mc9s12 has port T set to input, and I want to connect one line on those ports. There are no large amounts of data being sent, as I am just holding the line high or low. My question is, do I need a current limiting resistor in between the two? I have not yet found the documentation that shows me the internal circuitry configurations of the ports. If somebody could point me to that, or give me a yea or nay on the resistor, that would be great! Or you can just tell me not to be lazy, and figure it out myself! lol It would be great to hear what a few of you have to say though. Seems like I remember seen a open collector configuration on my old HC11. I must have been looking at port B (that was output only)!
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks in advance everyone! This is a GREAT yahoo group!
&lt;br&gt;&lt;br&gt;Jerry Fields 
&lt;br&gt;__________________________________________________________
&lt;br&gt;Hotmail: Trusted email with powerful SPAM protection.
&lt;br&gt;&lt;a href=&quot;http://clk.atdmt.com/GBL/go/177141665/direct/01/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://clk.atdmt.com/GBL/go/177141665/direct/01/&lt;/a&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;		 	 &amp;nbsp; 		 &amp;nbsp;
&lt;br&gt;_________________________________________________________________
&lt;br&gt;Hotmail: Trusted email with powerful SPAM protection.
&lt;br&gt;&lt;a href=&quot;http://clk.atdmt.com/GBL/go/177141665/direct/01/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://clk.atdmt.com/GBL/go/177141665/direct/01/&lt;/a&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------
&lt;br&gt;&lt;br&gt;Yahoo! Groups Links
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To visit your group on the web, go to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://groups.yahoo.com/group/68HC12/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.yahoo.com/group/68HC12/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; Your email settings:
&lt;br&gt;&amp;nbsp; &amp;nbsp; Individual Email | Traditional
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To change settings online go to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://groups.yahoo.com/group/68HC12/join&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.yahoo.com/group/68HC12/join&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; (Yahoo! ID required)
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To change settings via email:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26485972&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-digest@...&lt;/a&gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26485972&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-fullfeatured@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To unsubscribe from this group, send an email to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26485972&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; Your use of Yahoo! Groups is subject to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://docs.yahoo.com/info/terms/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.yahoo.com/info/terms/&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/HCS12-to-HCS12-Port-interfacing-tp26485498p26485972.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26485498</id>
	<title>HCS12 to HCS12 Port interfacing</title>
	<published>2009-11-23T12:45:05Z</published>
	<updated>2009-11-23T12:45:05Z</updated>
	<author>
		<name>tronictech1</name>
	</author>
	<content type="html">&lt;br&gt;Hello,
&lt;br&gt;&amp;nbsp;
&lt;br&gt;I have two MC9S12DP512 microcontrollers, and I need to interface them. &amp;nbsp;The first mc9s12, has port P set to output, the second mc9s12 has port T set to input, and I want to connect one line on those ports. There are no large amounts of data being sent, as I am just holding the line high or low. My question is, do I need a current limiting resistor in between the two? I have not yet found the documentation that shows me the internal circuitry configurations of the ports. If somebody could point me to that, or give me a yea or nay on the resistor, that would be great! Or you can just tell me not to be lazy, and figure it out myself! lol It would be great to hear what a few of you have to say though. Seems like I remember seen a open collector configuration on my old HC11. I must have been looking at port B (that was output only)!
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Thanks in advance everyone! This is a GREAT yahoo group!
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Jerry Fields 		 	 &amp;nbsp; 		 &amp;nbsp;
&lt;br&gt;_________________________________________________________________
&lt;br&gt;Hotmail: Trusted email with powerful SPAM protection.
&lt;br&gt;&lt;a href=&quot;http://clk.atdmt.com/GBL/go/177141665/direct/01/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://clk.atdmt.com/GBL/go/177141665/direct/01/&lt;/a&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/HCS12-to-HCS12-Port-interfacing-tp26485498p26485498.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26465760</id>
	<title>Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-22T06:30:49Z</published>
	<updated>2009-11-22T06:30:49Z</updated>
	<author>
		<name>defessler</name>
	</author>
	<content type="html">Alright. I finally have it working properly. I had the wheels in a carriage and I was unable to get the proper leverage on the calibration screw and it wasn't turn past a certain point, I thought it was a limit of the screw. I took the motors out of the carriage and put some force into the screws. 
&lt;br&gt;&lt;br&gt;The motors now rest at 3000 and turn proper if I increase it from 3000 to 3400 and 2600 respectively.
&lt;br&gt;&lt;br&gt;Hello,
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin the motor, but it only ever spins in 1 direction and I can not make it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPER01 = 5000; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMDTY01 = 225; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26465760.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26465210</id>
	<title>Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-22T05:14:22Z</published>
	<updated>2009-11-22T05:14:22Z</updated>
	<author>
		<name>defessler</name>
	</author>
	<content type="html">1.5ms pulse, 20ms pause:
&lt;br&gt;PER = 21.5ms *2MHz = 43000. DTY = PER * 1.5/(20+1.5) = 3000
&lt;br&gt;&lt;br&gt;1.3ms pulse, 20ms pause
&lt;br&gt;PER = 42600, DTY = 2600
&lt;br&gt;&lt;br&gt;1.7ms pulse, 20ms pause:
&lt;br&gt;PER = 43400, DTY = 3400
&lt;br&gt;&lt;br&gt;I tried the settings above like you suggested, but it would still only rotate in 1 direction. I decided to mess around a bit and discovered that with PER at 43000 I could set DTY like this. I guess if it works, then &amp;nbsp;I should use it like that, but it seems wrong.
&lt;br&gt;&lt;br&gt;DTY = 2200 at rest.
&lt;br&gt;DTY = 2100 spins clockwise. (2000 full speed)
&lt;br&gt;DTY = 2300 spins counter-clockwise. (2400 full speed)
&lt;br&gt;&lt;br&gt;Based on the data sheet this should work. The values the data sheet wants should work perfectly like you suggested. I had tried that before when I was using 5000 for the PER, except I did the calculation for the DTY wrong. I had 5375 for the PER and 403 for the DTY instead of 375.
&lt;br&gt;&lt;br&gt;Hello,
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin the motor, but it only ever spins in 1 direction and I can not make it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPER01 = 5000; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMDTY01 = 225; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26465210.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26463989</id>
	<title>Re: Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-22T02:12:41Z</published>
	<updated>2009-11-22T02:12:41Z</updated>
	<author>
		<name>Edward Karpicz</name>
	</author>
	<content type="html">OK, let's look into datasheet. Is this the right one ?:
&lt;br&gt;&lt;a href=&quot;http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/900-00008-CRServo-v2.0.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/900-00008-CRServo-v2.0.pdf&lt;/a&gt;&lt;br&gt;&lt;br&gt;From previous mails I understood that PWM period is 20ms. But it seems 20ms 
&lt;br&gt;is not the period, but a pause between pulses! Looks like both, period and 
&lt;br&gt;pulse width should be adjusted every time.
&lt;br&gt;&lt;br&gt;1.5ms pulse, 20ms pause:
&lt;br&gt;PER = 21.5ms *2MHz = 43000. DTY = PER * 1.5/(20+1.5) = 3000
&lt;br&gt;&lt;br&gt;1.3ms pulse, 20ms pause
&lt;br&gt;PER = 42600, DTY = 2600
&lt;br&gt;&lt;br&gt;1.7ms pulse, 20ms pause:
&lt;br&gt;PER = 43400, DTY = 3400
&lt;br&gt;&lt;br&gt;Edward
&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26463989&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;defessler@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26463989&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68hc12@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Sunday, November 22, 2009 10:21 AM
&lt;br&gt;Subject: [68HC12] Re: Controlling a Servo with the HC12?
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;I tried it with 40000 PWMPER and 3000 PWMDTY and it spins, but still only 
&lt;br&gt;&amp;gt;in 1 direction and doesn't rest at 3000. I think I need to track down an 
&lt;br&gt;&amp;gt;oscilloscope and make sure it's giving the pulses I am looking for, I can 
&lt;br&gt;&amp;gt;probably go to my college and use one.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I did manage to set the PWMPER to 2000 with no prescaler (test program I 
&lt;br&gt;&amp;gt; wrote to learn PWM originally) and if I set it to 0, it would stay at rest 
&lt;br&gt;&amp;gt; (no pulse) and every time I increase it by 100 it would move slightly 
&lt;br&gt;&amp;gt; faster until it was spinning full speed. Oddly, if I set it to about 1991 
&lt;br&gt;&amp;gt; it would slowly turn in the other direction and speed up slowly as I 
&lt;br&gt;&amp;gt; increased the value by 1 (anything below 1991 spin the same direction as 
&lt;br&gt;&amp;gt; it did with 100).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am pretty sure I am running a 4MHz crystal which is divided by 2 to get 
&lt;br&gt;&amp;gt; 2MHz. I am using PWM CH1 pin to read the pulse.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for the info on the math. I understand what log and ln are, but 
&lt;br&gt;&amp;gt; I've honestly never seen ceil before.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPOL = 0x02; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x00; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPER01 = 40000;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMDTY01 = 3000;
&lt;br&gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) 
&lt;br&gt;&amp;gt;&amp;gt;using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 
&lt;br&gt;&amp;gt;&amp;gt;1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can 
&lt;br&gt;&amp;gt;&amp;gt;spin the motor, but it only ever spins in 1 direction and I can not make 
&lt;br&gt;&amp;gt;&amp;gt;it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMPER01 = 5000;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMDTY01 = 225;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;&amp;gt;------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yahoo! Groups Links
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26463989.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26463480</id>
	<title>Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-22T00:21:11Z</published>
	<updated>2009-11-22T00:21:11Z</updated>
	<author>
		<name>defessler</name>
	</author>
	<content type="html">I tried it with 40000 PWMPER and 3000 PWMDTY and it spins, but still only in 1 direction and doesn't rest at 3000. I think I need to track down an oscilloscope and make sure it's giving the pulses I am looking for, I can probably go to my college and use one.
&lt;br&gt;&lt;br&gt;I did manage to set the PWMPER to 2000 with no prescaler (test program I wrote to learn PWM originally) and if I set it to 0, it would stay at rest (no pulse) and every time I increase it by 100 it would move slightly faster until it was spinning full speed. Oddly, if I set it to about 1991 it would slowly turn in the other direction and speed up slowly as I increased the value by 1 (anything below 1991 spin the same direction as it did with 100).
&lt;br&gt;&lt;br&gt;I am pretty sure I am running a 4MHz crystal which is divided by 2 to get 2MHz. I am using PWM CH1 pin to read the pulse. 
&lt;br&gt;&lt;br&gt;Thanks for the info on the math. I understand what log and ln are, but I've honestly never seen ceil before.
&lt;br&gt;&lt;br&gt;&amp;nbsp; PWMPOL = 0x02; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;nbsp; PWMPRCLK = 0x00; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;nbsp; PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;nbsp; PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;nbsp; PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;nbsp; PWMPER01 = 40000; &amp;nbsp;
&lt;br&gt;&amp;nbsp; PWMDTY01 = 3000; &amp;nbsp;
&lt;br&gt;&amp;nbsp; PWME = 0x02;
&lt;br&gt;&lt;br&gt;Hello,
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin the motor, but it only ever spins in 1 direction and I can not make it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPER01 = 5000; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMDTY01 = 225; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26463480.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26461116</id>
	<title>Re: Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-21T14:42:50Z</published>
	<updated>2009-11-21T14:42:50Z</updated>
	<author>
		<name>Edward Karpicz</name>
	</author>
	<content type="html">Oh, I'm very sorry. I wasn't drunk but something went mad. Of course 20ms is 
&lt;br&gt;0.02*2000000 = 40000 bus clock periods, not 1E8 8-). Prescaler is not 
&lt;br&gt;required, because 40000 fits in 16bits. PER = 40000, DTY = 1.5/20 * 40000 = 
&lt;br&gt;3000. Clock source not scaled clock A.
&lt;br&gt;&lt;br&gt;But your settings with 1/8 prescaler and fixed DTY to 375 should be fine 
&lt;br&gt;indeed. Do you really run at 2MHz bus? It is 4MHz crystal and PLL not used, 
&lt;br&gt;right?
&lt;br&gt;I see you have PWMPOL = 1. But in 16bits mode (concatenated two 8bit 
&lt;br&gt;channels) bit1 (not bit0) controls PWM01 output polarity. So please change 
&lt;br&gt;it to PWMPOL = 2. Also, do you expect PWM output on PTP1 pin, right?
&lt;br&gt;&lt;br&gt;Calculation is quite simple. log base 2 can be used to quickly find least 
&lt;br&gt;2^N divider without trial and error. For example let's consider the same but 
&lt;br&gt;for 8bit PWM. 40000 bus clocks period should be prescaled to fit 8bits. 
&lt;br&gt;log2(40000) = ln(40000)/ln(2) = 15.28. ceil(15.28) stands for round 15.28 up 
&lt;br&gt;to 16. So we need to divide 40000 by 2^(16 - 8) = 256. Period setting would 
&lt;br&gt;be 40000 / 256 = 156.25 then.
&lt;br&gt;&lt;br&gt;Prescaler divides by power of 2. PWMSCL setting divides by N and then by 2 
&lt;br&gt;(see Figure 12-34. PWM Clock Select Block Diagram). So to find both least 
&lt;br&gt;dividers, you divide 40000 by maximum period setting (256 in 8bits mode). 
&lt;br&gt;40000/256 = 156.25. Prescaler 2^N is not required, because 156 fits PWMSCL 
&lt;br&gt;max setting. Else you could use log2 to find least 2^N divider, then 
&lt;br&gt;calculate PWMSCL setting.
&lt;br&gt;&lt;br&gt;Edward
&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26461116&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;defessler@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26461116&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68hc12@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Saturday, November 21, 2009 11:27 PM
&lt;br&gt;Subject: [68HC12] Re: Controlling a Servo with the HC12?
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;I am making progress with your advice, but I have to say my math skills are 
&lt;br&gt;&amp;gt;very lacking and I can not completely understand where you get getting your 
&lt;br&gt;&amp;gt;numbers.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) 
&lt;br&gt;&amp;gt;&amp;gt;using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 
&lt;br&gt;&amp;gt;&amp;gt;1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can 
&lt;br&gt;&amp;gt;&amp;gt;spin the motor, but it only ever spins in 1 direction and I can not make 
&lt;br&gt;&amp;gt;&amp;gt;it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMPER01 = 5000;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWMDTY01 = 225;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;&amp;gt;------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yahoo! Groups Links
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26461116.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26460517</id>
	<title>Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-21T13:27:05Z</published>
	<updated>2009-11-21T13:27:05Z</updated>
	<author>
		<name>defessler</name>
	</author>
	<content type="html">I am making progress with your advice, but I have to say my math skills are very lacking and I can not completely understand where you get getting your numbers.
&lt;br&gt;&lt;br&gt;Hello,
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin the motor, but it only ever spins in 1 direction and I can not make it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPER01 = 5000; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMDTY01 = 225; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26460517.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26460026</id>
	<title>Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-21T12:36:15Z</published>
	<updated>2009-11-21T12:36:15Z</updated>
	<author>
		<name>defessler</name>
	</author>
	<content type="html">I'll give that a try. I did not mean to offend you. I was just being somewhat playful and I've spent a great deal of time on this. I admit I am very new to the concepts involved with a micro-controller. I did do all the calculations for the registers. I was doing some guess work when I created this. I knew the rest point was suppose to be 375 but that was not working and I tried to lower and raise the values randomly for quick tests and I didn't notice that I didn't change it back when I posted this. I had gotten my original values like this. 
&lt;br&gt;&lt;br&gt;Right now I have: 
&lt;br&gt;&lt;br&gt;2MHz/8 = 250KHz
&lt;br&gt;1/250KHz = 4micros
&lt;br&gt;20ms / 4micros = 5000 = PWMPER01
&lt;br&gt;1.5ms/20ms = 7.5%
&lt;br&gt;7.5% * 20ms = 375 = PWMDTY01
&lt;br&gt;&lt;br&gt;I was suspecting it had something to do with the PWMSCAL but the manual seemed to provide a foggy explanation of that register. I very much appreciate all the help so far. I'm going to try what you recommended, I'll post back on how it goes.
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;Hello,
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin the motor, but it only ever spins in 1 direction and I can not make it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPER01 = 5000; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMDTY01 = 225; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26460026.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26457175</id>
	<title>Re: Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-21T06:44:14Z</published>
	<updated>2009-11-21T06:44:14Z</updated>
	<author>
		<name>Edward Karpicz</name>
	</author>
	<content type="html">I forgot that PWMSCLA isn't power of two divider. Doesn't mean previous 
&lt;br&gt;settings won't work, but duty cycle resolution can be improved a bit.
&lt;br&gt;1E8 / 2^16 = ~1526 . Dividing that by 2 (scaled clock fixed divider) we get 
&lt;br&gt;763. This should be prescaled by 2^N to fit max possible PWMSCL/2 setting of 
&lt;br&gt;256. ceil(log2(763)) - log2(256) = 2 . Prescaler setting 1/(2^2)=1/4 . 
&lt;br&gt;PWMSCLA setting 4/ 1526 &amp;nbsp;= ~ 1/382 . Period setting 1E8 / 4 / 382 = 65445. 
&lt;br&gt;Motor rest setting - 4908
&lt;br&gt;&lt;br&gt;Edward
&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; defessler@g.. wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If only the answer was so simple. I've tried various methods. My bus runs
&lt;br&gt;&amp;gt;&amp;gt; at 2MHz.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Don't you think it is so simple to not reply and not help at all? One 
&lt;br&gt;&amp;gt; finds
&lt;br&gt;&amp;gt; a bug in your &amp;quot;I'll guess all my settings&amp;quot; -style code and the best you 
&lt;br&gt;&amp;gt; can
&lt;br&gt;&amp;gt; say is it doesn't help?
&lt;br&gt;&amp;gt; 2MHz bus. 20ms period expressed in bus cycles = 2MHz/20ms=1E8. 16bits PWM,
&lt;br&gt;&amp;gt; so you need to scale 1E8 down to fit 2^16. Least power of two divider is
&lt;br&gt;&amp;gt; 2^(ceil(log2(1E8)) - 16) = 2^(ceil(ln(1E8)/ln(2)) - 16) = 2^11 = 2048.
&lt;br&gt;&amp;gt; Definitely scaled clock SA should be chosen, not A like in your work. 
&lt;br&gt;&amp;gt; 1/512
&lt;br&gt;&amp;gt; setting in PWMSCLA and 1/4 setting in PWMPRCLK could be fine. Then period
&lt;br&gt;&amp;gt; setting will be 1E8/2048 = 48828. Rest pulse width setting - 3662.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Edward
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I did try that for the duty cycle. I've tried various different prescaler
&lt;br&gt;&amp;gt;&amp;gt; settings. I can not get the motor to turn more than 1 way. I've also 
&lt;br&gt;&amp;gt;&amp;gt; tried
&lt;br&gt;&amp;gt;&amp;gt; another motor with the same issues.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have the servo connected to 3 double A batteries, tied the ground with
&lt;br&gt;&amp;gt;&amp;gt; the microcontroller ground. The microcontroller is running off of USB
&lt;br&gt;&amp;gt;&amp;gt; power from my computer. I have PWM channel 1 connected to the pulse in of
&lt;br&gt;&amp;gt;&amp;gt; the servo.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --Original Message--
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;Can't verify all your settings, you didn't specify bus frequency. But if
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;period setting is 5000 for 20ms, then duty cycle setting should be not
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;225,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;but 1.5/20*5000 = 375 for rest, 325 for clockwise and 425 for ccw.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;Edward
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Yahoo! Groups Links
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yahoo! Groups Links
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26457175.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26455214</id>
	<title>Re: Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-21T02:19:45Z</published>
	<updated>2009-11-21T02:19:45Z</updated>
	<author>
		<name>Edward Karpicz</name>
	</author>
	<content type="html">defessler@g.. wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; If only the answer was so simple. I've tried various methods. My bus runs 
&lt;br&gt;&amp;gt; at 2MHz.
&lt;br&gt;&lt;br&gt;Don't you think it is so simple to not reply and not help at all? One finds 
&lt;br&gt;a bug in your &amp;quot;I'll guess all my settings&amp;quot; -style code and the best you can 
&lt;br&gt;say is it doesn't help?
&lt;br&gt;2MHz bus. 20ms period expressed in bus cycles = 2MHz/20ms=1E8. 16bits PWM, 
&lt;br&gt;so you need to scale 1E8 down to fit 2^16. Least power of two divider is 
&lt;br&gt;2^(ceil(log2(1E8)) - 16) = 2^(ceil(ln(1E8)/ln(2)) - 16) = 2^11 = 2048. 
&lt;br&gt;Definitely scaled clock SA should be chosen, not A like in your work. 1/512 
&lt;br&gt;setting in PWMSCLA and 1/4 setting in PWMPRCLK could be fine. Then period 
&lt;br&gt;setting will be 1E8/2048 = 48828. Rest pulse width setting - 3662.
&lt;br&gt;&lt;br&gt;Edward
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I did try that for the duty cycle. I've tried various different prescaler 
&lt;br&gt;&amp;gt; settings. I can not get the motor to turn more than 1 way. I've also tried 
&lt;br&gt;&amp;gt; another motor with the same issues.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have the servo connected to 3 double A batteries, tied the ground with 
&lt;br&gt;&amp;gt; the microcontroller ground. The microcontroller is running off of USB 
&lt;br&gt;&amp;gt; power from my computer. I have PWM channel 1 connected to the pulse in of 
&lt;br&gt;&amp;gt; the servo.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --Original Message--
&lt;br&gt;&amp;gt;&amp;gt;Can't verify all your settings, you didn't specify bus frequency. But if
&lt;br&gt;&amp;gt;&amp;gt;period setting is 5000 for 20ms, then duty cycle setting should be not 
&lt;br&gt;&amp;gt;&amp;gt;225,
&lt;br&gt;&amp;gt;&amp;gt;but 1.5/20*5000 = 375 for rest, 325 for clockwise and 425 for ccw.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;Edward
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yahoo! Groups Links
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26455214.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26454339</id>
	<title>Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-20T23:22:46Z</published>
	<updated>2009-11-20T23:22:46Z</updated>
	<author>
		<name>defessler</name>
	</author>
	<content type="html">If only the answer was so simple. I've tried various methods. My bus runs at 2MHz. 
&lt;br&gt;&lt;br&gt;I did try that for the duty cycle. I've tried various different prescaler settings. I can not get the motor to turn more than 1 way. I've also tried another motor with the same issues.
&lt;br&gt;&lt;br&gt;I have the servo connected to 3 double A batteries, tied the ground with the microcontroller ground. The microcontroller is running off of USB power from my computer. I have PWM channel 1 connected to the pulse in of the servo.
&lt;br&gt;&lt;br&gt;--Original Message--
&lt;br&gt;&amp;gt;Can't verify all your settings, you didn't specify bus frequency. But if
&lt;br&gt;&amp;gt;period setting is 5000 for 20ms, then duty cycle setting should be not 225,
&lt;br&gt;&amp;gt;but 1.5/20*5000 = 375 for rest, 325 for clockwise and 425 for ccw.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Edward
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26454339.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26454234</id>
	<title>Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-20T22:52:50Z</published>
	<updated>2009-11-20T22:52:50Z</updated>
	<author>
		<name>Edward Karpicz</name>
	</author>
	<content type="html">Can't verify all your settings, you didn't specify bus frequency. But if 
&lt;br&gt;period setting is 5000 for 20ms, then duty cycle setting should be not 225, 
&lt;br&gt;but 1.5/20*5000 = 375 for rest, 325 for clockwise and 425 for ccw.
&lt;br&gt;&lt;br&gt;Edward
&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26454234&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;defessler@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26454234&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68hc12@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Friday, November 20, 2009 9:55 PM
&lt;br&gt;Subject: [68HC12] Controlling a Servo with the HC12?
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am trying to control a Parallax Continuous Rotation Servo (#900-00008) 
&lt;br&gt;&amp;gt; using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 
&lt;br&gt;&amp;gt; 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can 
&lt;br&gt;&amp;gt; spin the motor, but it only ever spins in 1 direction and I can not make 
&lt;br&gt;&amp;gt; it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPER01 = 5000;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMDTY01 = 225;
&lt;br&gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yahoo! Groups Links
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26454234.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26453340</id>
	<title>RE: Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-20T18:57:41Z</published>
	<updated>2009-11-20T18:57:41Z</updated>
	<author>
		<name>Darren Moore-2</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&lt;br&gt;Its the mark to space you need to change, not the frequency.
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Darren
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26453340&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26453340&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;] On Behalf Of
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26453340&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;defessler@...&lt;/a&gt;
&lt;br&gt;Sent: Saturday, 21 November 2009 10:33
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26453340&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68hc12@...&lt;/a&gt;
&lt;br&gt;Subject: [68HC12] Re: Controlling a Servo with the HC12?
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&lt;br&gt;The wheel turns in one direction regardless of the frequency I set.
&lt;br&gt;&lt;br&gt;Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008)
&lt;br&gt;using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest),
&lt;br&gt;1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin
&lt;br&gt;the motor, but it only ever spins in 1 direction and I can not make it stop
&lt;br&gt;spinning even if I try to calibrate it.
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; PWMPOL = 0x01; // High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; PWMPRCLK = 0x03; // Prescaler.
&lt;br&gt;&amp;gt; PWMCLK = 0x00; // Sets clock A to be ch 1 clock.
&lt;br&gt;&amp;gt; PWMCAE = 0x00; // Sets left aligned PWM.
&lt;br&gt;&amp;gt; PWMCTL = 0x10; // Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; PWMPER01 = 5000; 
&lt;br&gt;&amp;gt; PWMDTY01 = 225; 
&lt;br&gt;&amp;gt; PWME = 0x02;
&lt;br&gt;&amp;gt;------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26453340.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26451978</id>
	<title>Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-20T15:32:54Z</published>
	<updated>2009-11-20T15:32:54Z</updated>
	<author>
		<name>defessler</name>
	</author>
	<content type="html">The wheel turns in one direction regardless of the frequency I set.
&lt;br&gt;&lt;br&gt;Hello,
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin the motor, but it only ever spins in 1 direction and I can not make it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPER01 = 5000; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMDTY01 = 225; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26451978.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26451853</id>
	<title>Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-20T15:21:04Z</published>
	<updated>2009-11-20T15:21:04Z</updated>
	<author>
		<name>defessler</name>
	</author>
	<content type="html">I do no have an oscilloscope. I am still looking at the code. 
&lt;br&gt;&lt;br&gt;Hello,
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin the motor, but it only ever spins in 1 direction and I can not make it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPER01 = 5000; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMDTY01 = 225; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26451853.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26451718</id>
	<title>Re: Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-20T15:08:53Z</published>
	<updated>2009-11-20T15:08:53Z</updated>
	<author>
		<name>Andrei Chichak-2</name>
	</author>
	<content type="html">If your servo is chattering in its rotation, I would say that the frequency is wrong.
&lt;br&gt;If your servo continues to rotate, I would say that the PWM duty cycle is wrong (or upside down).
&lt;br&gt;&lt;br&gt;The numbers are based on the xtal frequency, so adjust appropriately.
&lt;br&gt;&lt;br&gt;&lt;br&gt;This is the code that I used on my 24MHz DP512. 
&lt;br&gt;&lt;br&gt;void PWMInit(void) {
&lt;br&gt;/*
&lt;br&gt;&amp;nbsp;* Function Name: PWMInit
&lt;br&gt;&amp;nbsp;* Returns		: void
&lt;br&gt;&amp;nbsp;* arg1			: void 
&lt;br&gt;&amp;nbsp;* arg2			: 
&lt;br&gt;&amp;nbsp;* arg3			: 
&lt;br&gt;&amp;nbsp;* Created By	: andreic
&lt;br&gt;&amp;nbsp;* Date Created	: Dec 11, 2006
&lt;br&gt;&amp;nbsp;* Description	: 
&lt;br&gt;&amp;nbsp;* Notes		: 
&lt;br&gt;&amp;nbsp;*/ 	
&lt;br&gt;&amp;nbsp;	/*
&lt;br&gt;&amp;nbsp;	 * Bits 0 and 1 provides a 500kHz. PWM that is modulated in the one wire communications system
&lt;br&gt;&amp;nbsp;	 * Enable PWM on bit 0, set up the period as 24MHz/0.5MHz = 48 and duty cycle of 50% 0.5(48) = 24
&lt;br&gt;&amp;nbsp;	 */
&lt;br&gt;&amp;nbsp;	 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PWME_bit.PWME0 = 1;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PWMPER0 = &amp;nbsp;48;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PWMDTY0 = 24;
&lt;br&gt;&amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PWME_bit.PWME1 = 1;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PWMPER1 = &amp;nbsp;48;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PWMDTY1 = 24;
&lt;br&gt;&amp;nbsp; &amp;nbsp; 
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;void PWMAlter(INT8U period) {
&lt;br&gt;/*
&lt;br&gt;&amp;nbsp;* Function Name: PWMAlter
&lt;br&gt;&amp;nbsp;* Returns		: void
&lt;br&gt;&amp;nbsp;* arg1			: period - divisor assuming a 24MHz clock
&lt;br&gt;&amp;nbsp;* arg2			: 
&lt;br&gt;&amp;nbsp;* arg3			: 
&lt;br&gt;&amp;nbsp;* Created By	: andreic
&lt;br&gt;&amp;nbsp;* Date Created	: Dec 11, 2006
&lt;br&gt;&amp;nbsp;* Description	: 
&lt;br&gt;&amp;nbsp;* Notes		: 
&lt;br&gt;&amp;nbsp;*/ 	 	 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PWME_bit.PWME0 = 1;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PWMPER0 = &amp;nbsp;period;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PWMDTY0 = period/2;
&lt;br&gt;&amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PWME_bit.PWME1 = 1;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PWMPER1 = &amp;nbsp;period;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PWMDTY1 = period/2;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;A
&lt;br&gt;&lt;br&gt;&lt;br&gt;On 2009-November-20, at 3:44 PM, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451718&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;defessler@...&lt;/a&gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I have been doing that. It refuses to turn any direction aside from clockwise. Do you see any issues with my code. This is what I have now.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; PWMPOL = 0x01; // High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; PWMPRCLK = 0x06; // Prescaler.
&lt;br&gt;&amp;gt; PWMCLK = 0x00; // Sets clock A to be ch 1 clock.
&lt;br&gt;&amp;gt; PWMCAE = 0x00; // Sets left aligned PWM.
&lt;br&gt;&amp;gt; PWMCTL = 0x10; // Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; PWMPER0 = 0x09; // Sets up ch1 @ 43Hz w/ .000064 count.
&lt;br&gt;&amp;gt; PWMPER1 = 2499;
&lt;br&gt;&amp;gt; PWMDTY01 = 187; 
&lt;br&gt;&amp;gt; PWME = 0x02;
&lt;br&gt;&amp;gt; PWMSCLA = 0x00;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin the motor, but it only ever spins in 1 direction and I can not make it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; PWMPOL = 0x01; // High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; &amp;gt; PWMPRCLK = 0x03; // Prescaler.
&lt;br&gt;&amp;gt; &amp;gt; PWMCLK = 0x00; // Sets clock A to be ch 1 clock.
&lt;br&gt;&amp;gt; &amp;gt; PWMCAE = 0x00; // Sets left aligned PWM.
&lt;br&gt;&amp;gt; &amp;gt; PWMCTL = 0x10; // Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; &amp;gt; PWMPER01 = 5000; 
&lt;br&gt;&amp;gt; &amp;gt; PWMDTY01 = 225; 
&lt;br&gt;&amp;gt; &amp;gt; PWME = 0x02;
&lt;br&gt;&amp;gt; &amp;gt;------------------------------------
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;---------------------
&lt;br&gt;Andrei Chichak
&lt;br&gt;&lt;br&gt;Systems Developer
&lt;br&gt;CBF Systems Inc.
&lt;br&gt;4-038 NINT Innovation Centre
&lt;br&gt;11421 Saskatchewan Drive
&lt;br&gt;Edmonton, Alberta
&lt;br&gt;Canada
&lt;br&gt;T6G 2M9
&lt;br&gt;&lt;br&gt;Phone: 780-628-2072
&lt;br&gt;Skype: andrei.chichak
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------
&lt;br&gt;&lt;br&gt;Yahoo! Groups Links
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To visit your group on the web, go to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://groups.yahoo.com/group/68HC12/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.yahoo.com/group/68HC12/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; Your email settings:
&lt;br&gt;&amp;nbsp; &amp;nbsp; Individual Email | Traditional
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To change settings online go to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://groups.yahoo.com/group/68HC12/join&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.yahoo.com/group/68HC12/join&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; (Yahoo! ID required)
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To change settings via email:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451718&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-digest@...&lt;/a&gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451718&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-fullfeatured@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To unsubscribe from this group, send an email to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451718&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; Your use of Yahoo! Groups is subject to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://docs.yahoo.com/info/terms/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.yahoo.com/info/terms/&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26451718.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26451626</id>
	<title>RE: Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-20T14:59:59Z</published>
	<updated>2009-11-20T14:59:59Z</updated>
	<author>
		<name>Redd, Emmett R-2</name>
	</author>
	<content type="html">Do you have an oscilloscope (to verify the length and frequency of your pulses)?
&lt;br&gt;&lt;br&gt;Emmett Redd Ph.D. &amp;nbsp; mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451626&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;EmmettRedd@...&lt;/a&gt;
&lt;br&gt;Professor &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (417)836-5221
&lt;br&gt;Department of Physics, Astronomy, and Materials Science
&lt;br&gt;Missouri State University &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fax (417)836-6226
&lt;br&gt;901 SOUTH NATIONAL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Lab (417)836-3770
&lt;br&gt;SPRINGFIELD, MO &amp;nbsp;65897 &amp;nbsp; USA &amp;nbsp; &amp;nbsp;Dept (417)836-5131
&lt;br&gt;&lt;br&gt;&amp;quot;In theory there is no difference between theory and practice. In practice there is.&amp;quot; -- Yogi Berra or Jan van de Snepscheut
&lt;br&gt;&lt;br&gt;________________________________________
&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451626&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt; [&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451626&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;] On Behalf Of &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451626&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;defessler@...&lt;/a&gt; [&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451626&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;defessler@...&lt;/a&gt;]
&lt;br&gt;Sent: Friday, November 20, 2009 4:44 PM
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451626&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68hc12@...&lt;/a&gt;
&lt;br&gt;Subject: [68HC12] Re: Controlling a Servo with the HC12?
&lt;br&gt;&lt;br&gt;I have been doing that. It refuses to turn any direction aside from clockwise. Do you see any issues with my code. This is what I have now.
&lt;br&gt;&lt;br&gt;&amp;nbsp; PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;nbsp; PWMPRCLK = 0x06; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;nbsp; PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;nbsp; PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;nbsp; PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;nbsp; PWMPER0 = 0x09; &amp;nbsp;// Sets up ch1 @ 43Hz w/ .000064 count.
&lt;br&gt;&amp;nbsp; PWMPER1 = 2499;
&lt;br&gt;&amp;nbsp; PWMDTY01 = 187;
&lt;br&gt;&amp;nbsp; PWME = 0x02;
&lt;br&gt;&amp;nbsp; PWMSCLA = 0x00;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Hello,
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin the motor, but it only ever spins in 1 direction and I can not make it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPER01 = 5000;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMDTY01 = 225;
&lt;br&gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;------------------------------------
&lt;br&gt;&lt;br&gt;Yahoo! Groups Links
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26451626.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26451436</id>
	<title>Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-20T14:44:04Z</published>
	<updated>2009-11-20T14:44:04Z</updated>
	<author>
		<name>defessler</name>
	</author>
	<content type="html">I have been doing that. It refuses to turn any direction aside from clockwise. Do you see any issues with my code. This is what I have now.
&lt;br&gt;&lt;br&gt;&amp;nbsp; PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;nbsp; PWMPRCLK = 0x06; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;nbsp; PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;nbsp; PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;nbsp; PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;nbsp; PWMPER0 = 0x09; &amp;nbsp;// Sets up ch1 @ 43Hz w/ .000064 count.
&lt;br&gt;&amp;nbsp; PWMPER1 = 2499;
&lt;br&gt;&amp;nbsp; PWMDTY01 = 187; 
&lt;br&gt;&amp;nbsp; PWME = 0x02;
&lt;br&gt;&amp;nbsp; PWMSCLA = 0x00;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Hello,
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin the motor, but it only ever spins in 1 direction and I can not make it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; &amp;nbsp;PWMPER01 = 5000; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWMDTY01 = 225; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;PWME = 0x02;
&lt;br&gt;&amp;gt;------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26451436.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26451190</id>
	<title>Re: Controlling a Servo with the HC12?</title>
	<published>2009-11-20T14:20:55Z</published>
	<updated>2009-11-20T14:20:55Z</updated>
	<author>
		<name>Andrei Chichak-2</name>
	</author>
	<content type="html">There is a trim screw in the side of the servo. Set the pwm to 1.5ms and adjust the screw so that the servo stops moving. Then adjust the pwm and your servo will change directions properly.
&lt;br&gt;&lt;br&gt;Andrei
&lt;br&gt;&lt;br&gt;(code style police)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On 2009-November-20, at 12:55 PM, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451190&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;defessler@...&lt;/a&gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am trying to control a Parallax Continuous Rotation Servo (#900-00008) using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin the motor, but it only ever spins in 1 direction and I can not make it stop spinning even if I try to calibrate it.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any help is appreciated. Here is my current code.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; PWMPOL = 0x01; // High at beginning, low at end (active high).
&lt;br&gt;&amp;gt; PWMPRCLK = 0x03; // Prescaler.
&lt;br&gt;&amp;gt; PWMCLK = 0x00; // Sets clock A to be ch 1 clock.
&lt;br&gt;&amp;gt; PWMCAE = 0x00; // Sets left aligned PWM.
&lt;br&gt;&amp;gt; PWMCTL = 0x10; // Sets up ch0+1 16bit.
&lt;br&gt;&amp;gt; PWMPER01 = 5000; 
&lt;br&gt;&amp;gt; PWMDTY01 = 225; 
&lt;br&gt;&amp;gt; PWME = 0x02;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;---------------------
&lt;br&gt;Andrei Chichak
&lt;br&gt;&lt;br&gt;Systems Developer
&lt;br&gt;CBF Systems Inc.
&lt;br&gt;4-038 NINT Innovation Centre
&lt;br&gt;11421 Saskatchewan Drive
&lt;br&gt;Edmonton, Alberta
&lt;br&gt;Canada
&lt;br&gt;T6G 2M9
&lt;br&gt;&lt;br&gt;Phone: 780-628-2072
&lt;br&gt;Skype: andrei.chichak
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------
&lt;br&gt;&lt;br&gt;Yahoo! Groups Links
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To visit your group on the web, go to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://groups.yahoo.com/group/68HC12/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.yahoo.com/group/68HC12/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; Your email settings:
&lt;br&gt;&amp;nbsp; &amp;nbsp; Individual Email | Traditional
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To change settings online go to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://groups.yahoo.com/group/68HC12/join&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.yahoo.com/group/68HC12/join&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; (Yahoo! ID required)
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To change settings via email:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451190&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-digest@...&lt;/a&gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451190&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-fullfeatured@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To unsubscribe from this group, send an email to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451190&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; Your use of Yahoo! Groups is subject to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://docs.yahoo.com/info/terms/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.yahoo.com/info/terms/&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26451190.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26449352</id>
	<title>Controlling a Servo with the HC12?</title>
	<published>2009-11-20T11:55:01Z</published>
	<updated>2009-11-20T11:55:01Z</updated>
	<author>
		<name>defessler</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I am trying to control a Parallax Continuous Rotation Servo (#900-00008) using my MC9S12C128CFUE. I need to to use PWM to give a pulse 1.5ms(rest), 1.3ms (clockwise), and 1.7ms (counter-clockwise) every 20ms/50Hz. I can spin the motor, but it only ever spins in 1 direction and I can not make it stop spinning even if I try to calibrate it.
&lt;br&gt;&lt;br&gt;Any help is appreciated. Here is my current code.
&lt;br&gt;&lt;br&gt;&amp;nbsp; PWMPOL = 0x01; &amp;nbsp; &amp;nbsp;// High at beginning, low at end (active high).
&lt;br&gt;&amp;nbsp; PWMPRCLK = 0x03; &amp;nbsp;// Prescaler.
&lt;br&gt;&amp;nbsp; PWMCLK = 0x00; &amp;nbsp; &amp;nbsp;// Sets clock A to be ch 1 &amp;nbsp;clock.
&lt;br&gt;&amp;nbsp; PWMCAE = 0x00; &amp;nbsp; &amp;nbsp;// Sets left aligned PWM.
&lt;br&gt;&amp;nbsp; PWMCTL = 0x10; &amp;nbsp; &amp;nbsp;// Sets up ch0+1 16bit.
&lt;br&gt;&amp;nbsp; PWMPER01 = 5000; &amp;nbsp;
&lt;br&gt;&amp;nbsp; PWMDTY01 = 225; &amp;nbsp;
&lt;br&gt;&amp;nbsp; PWME = 0x02;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Controlling-a-Servo-with-the-HC12--tp26449352p26449352.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26401377</id>
	<title>RE: Dragin 12 board lcd help</title>
	<published>2009-11-17T18:16:02Z</published>
	<updated>2009-11-17T18:16:02Z</updated>
	<author>
		<name>justin lucas</name>
	</author>
	<content type="html">&lt;br&gt;&lt;a href=&quot;http://www.axman.com/?q=node/138&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.axman.com/?q=node/138&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;helps to include the website...
&lt;br&gt;&lt;br&gt;Justin
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26401377&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68hc12@...&lt;/a&gt;
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26401377&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jlucas134@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Date: Wed, 18 Nov 2009 01:59:56 +0000
&lt;br&gt;&amp;gt; Subject: RE: [68HC12] Dragin 12 board lcd help
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Here is a web site for some examples for programming with the LCD and other periphals.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Good luck.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Justin
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;quot;In theory, there is no difference between theory and practice. But, in practice, there is. &amp;quot;
&lt;br&gt;&amp;gt; --Yogi Berra/Jan L.A. van de Snepscheut--
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26401377&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26401377&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;maillists_for_tom@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Date: Tue, 17 Nov 2009 15:38:58 -0800
&lt;br&gt;&amp;gt; Subject: Re: [68HC12] Dragin 12 board lcd help
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The CD that comes with the board has an example program that uses the LCD display.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Tom Almy
&lt;br&gt;&amp;gt; Tualatin, Oregon USA
&lt;br&gt;&amp;gt; Internet: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26401377&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tom@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Website: almy.us
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Nov 17, 2009, at 7:53 AM, bjc_dude wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Hi All
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I need some help?. I need help with writing a program to display a name on the lcd of the dragon 12 board. I am writing this program in assembly using ASMIDE. What I am having a hard time finding is the proper port(s) to use and/or the memory address of the lcd.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Any help would be appreciated.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; bjc 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; ------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Yahoo! Groups Links
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _________________________________________________________________
&lt;br&gt;&amp;gt; Windows 7: I wanted simpler, now it's simpler. I'm a rock star.
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.microsoft.com/Windows/windows-7/default.aspx?h=myidea?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:112009&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.microsoft.com/Windows/windows-7/default.aspx?h=myidea?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:112009&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Yahoo! Groups Links
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&amp;nbsp;		 	 &amp;nbsp; 		 &amp;nbsp;
&lt;br&gt;_________________________________________________________________
&lt;br&gt;Windows 7: I wanted simpler, now it's simpler. I'm a rock star.
&lt;br&gt;&lt;a href=&quot;http://www.microsoft.com/Windows/windows-7/default.aspx?h=myidea?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:112009&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.microsoft.com/Windows/windows-7/default.aspx?h=myidea?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:112009&lt;/a&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Dragin-12-board-lcd-help-tp26392340p26401377.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26401242</id>
	<title>RE: Dragin 12 board lcd help</title>
	<published>2009-11-17T17:59:56Z</published>
	<updated>2009-11-17T17:59:56Z</updated>
	<author>
		<name>justin lucas</name>
	</author>
	<content type="html">&lt;br&gt;Here is a web site for some examples for programming with the LCD and other periphals.
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;Good luck.
&lt;br&gt;&lt;br&gt;Justin
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;quot;In theory, there is no difference between theory and practice. But, in practice, there is. &amp;quot;
&lt;br&gt;--Yogi Berra/Jan L.A. van de Snepscheut--
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26401242&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;
&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26401242&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;maillists_for_tom@...&lt;/a&gt;
&lt;br&gt;Date: Tue, 17 Nov 2009 15:38:58 -0800
&lt;br&gt;Subject: Re: [68HC12] Dragin 12 board lcd help
&lt;br&gt;&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The CD that comes with the board has an example program that uses the LCD display.
&lt;br&gt;&lt;br&gt;Tom Almy
&lt;br&gt;Tualatin, Oregon USA
&lt;br&gt;Internet: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26401242&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tom@...&lt;/a&gt;
&lt;br&gt;Website: almy.us
&lt;br&gt;&lt;br&gt;On Nov 17, 2009, at 7:53 AM, bjc_dude wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi All
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I need some help?. I need help with writing a program to display a name on the lcd of the dragon 12 board. I am writing this program in assembly using ASMIDE. What I am having a hard time finding is the proper port(s) to use and/or the memory address of the lcd.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any help would be appreciated.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; bjc 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Yahoo! Groups Links
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;		 	 &amp;nbsp; 		 &amp;nbsp;
&lt;br&gt;_________________________________________________________________
&lt;br&gt;Windows 7: I wanted simpler, now it's simpler. I'm a rock star.
&lt;br&gt;&lt;a href=&quot;http://www.microsoft.com/Windows/windows-7/default.aspx?h=myidea?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:112009&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.microsoft.com/Windows/windows-7/default.aspx?h=myidea?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:112009&lt;/a&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------
&lt;br&gt;&lt;br&gt;Yahoo! Groups Links
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To visit your group on the web, go to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://groups.yahoo.com/group/68HC12/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.yahoo.com/group/68HC12/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; Your email settings:
&lt;br&gt;&amp;nbsp; &amp;nbsp; Individual Email | Traditional
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To change settings online go to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://groups.yahoo.com/group/68HC12/join&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.yahoo.com/group/68HC12/join&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; (Yahoo! ID required)
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To change settings via email:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26401242&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-digest@...&lt;/a&gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26401242&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-fullfeatured@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To unsubscribe from this group, send an email to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26401242&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; Your use of Yahoo! Groups is subject to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://docs.yahoo.com/info/terms/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.yahoo.com/info/terms/&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Dragin-12-board-lcd-help-tp26392340p26401242.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26399904</id>
	<title>Re: Dragin 12 board lcd help</title>
	<published>2009-11-17T15:38:58Z</published>
	<updated>2009-11-17T15:38:58Z</updated>
	<author>
		<name>Tom Almy</name>
	</author>
	<content type="html">The CD that comes with the board has an example program that uses the LCD display.
&lt;br&gt;&lt;br&gt;Tom Almy
&lt;br&gt;Tualatin, Oregon USA
&lt;br&gt;Internet: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26399904&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tom@...&lt;/a&gt;
&lt;br&gt;Website: almy.us
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Nov 17, 2009, at 7:53 AM, bjc_dude wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi All
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I need some help?. I need help with writing a program to display a name on the lcd of the dragon 12 board. I am writing this program in assembly using ASMIDE. What I am having a hard time finding is the proper port(s) to use and/or the memory address of the lcd.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any help would be appreciated.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; bjc 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Yahoo! Groups Links
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Dragin-12-board-lcd-help-tp26392340p26399904.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26392340</id>
	<title>Dragin 12 board lcd help</title>
	<published>2009-11-17T07:53:19Z</published>
	<updated>2009-11-17T07:53:19Z</updated>
	<author>
		<name>bjc_dude</name>
	</author>
	<content type="html">Hi All
&lt;br&gt;&lt;br&gt;I need some help?. I need help with writing a program to display a name on the lcd of the dragon 12 board. I am writing this program in assembly using ASMIDE. What I am having a hard time finding is the proper port(s) to use and/or the memory address of the lcd.
&lt;br&gt;&lt;br&gt;Any help would be appreciated.
&lt;br&gt;&lt;br&gt;bjc 
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Dragin-12-board-lcd-help-tp26392340p26392340.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26362468</id>
	<title>RE: Re: VCC and Ground</title>
	<published>2009-11-15T11:33:55Z</published>
	<updated>2009-11-15T11:33:55Z</updated>
	<author>
		<name>justin lucas</name>
	</author>
	<content type="html">&lt;br&gt;Pending on which version you are using of the board determines what pins can be used. &amp;nbsp;If you are using the Mini-dragon Rev F, then the schematic specifically describes J21 (dedicated PORT for LCD) as pin 1 as GND and Pin 2 as VCC. It would appear you have the two set up correctly, but the other ports should be connected as well...as far as the pot goes...if you use the dedicated port for the LCD then no pot is needed. &amp;nbsp;Not really sure about using PORTA. &amp;nbsp;I recommend using the decidated J21 for the LCD...easier and already configured for output with the configuration for the LCD connection. &amp;nbsp;Is there a requirement to use PORTA?
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;Good luck
&lt;br&gt;&lt;br&gt;Justin 
&lt;br&gt;&lt;br&gt;&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362468&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;
&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362468&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;discoverylight@...&lt;/a&gt;
&lt;br&gt;Date: Sat, 14 Nov 2009 17:41:50 +0000
&lt;br&gt;Subject: [68HC12] Re: VCC and Ground
&lt;br&gt;&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Yes, I received the minidragon from Wytec, I know there are dedicated pins for LCDs but I would like to connect my LCD on a breadboard directly to port A. 
&lt;br&gt;&lt;br&gt;I've connected pin 1 of the LCD(14 pins) to GND of the minidragon and pin 2 to VCC output but the LCD did not turn on so I wonder if the VCC and GND are correct and whether I need a 10K pot.
&lt;br&gt;&lt;br&gt;Thanks you for your help
&lt;br&gt;&lt;br&gt;--- In &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362468&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;, justin lucas &amp;lt;jlucas134@...&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The Minidragon plus2 board should have ports/pin already dedicated to the LCD.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; As posted earlier, check the schematic...did you purchase the board through wytec?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362468&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;
&lt;br&gt;&amp;gt; From: bill@...
&lt;br&gt;&amp;gt; Date: Sat, 14 Nov 2009 08:16:07 -0500
&lt;br&gt;&amp;gt; Subject: Re: [68HC12] VCC and Ground
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Thai writes on 03:18 AM 11/14/2009
&lt;br&gt;&amp;gt; &amp;gt;I just purchased a Minidragon plus2 board and would like to 
&lt;br&gt;&amp;gt; &amp;gt;interface it with a 16x2 LCD display but I could not find where VCC 
&lt;br&gt;&amp;gt; &amp;gt;and GROUND on the board to power the LCD. Also do I really need a 
&lt;br&gt;&amp;gt; &amp;gt;10K POT to turn on the LCD or is it for contrast control
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Most displays do not need the pot and work find with 0V. Some older 
&lt;br&gt;&amp;gt; displays that did require it just needed a small negative voltage 
&lt;br&gt;&amp;gt; which few board have on them without generating it.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Sorry I don't know about the board's power to the LCD.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Bill
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; __________________________________________________________
&lt;br&gt;&amp;gt; Windows 7: It works the way you want. Learn more.
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen:112009v2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen:112009v2&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;		 	 &amp;nbsp; 		 &amp;nbsp;
&lt;br&gt;_________________________________________________________________
&lt;br&gt;Bing brings you maps, menus, and reviews organized in one place.
&lt;br&gt;&lt;a href=&quot;http://www.bing.com/search?q=restaurants&amp;form=MFESRP&amp;publ=WLHMTAG&amp;crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.bing.com/search?q=restaurants&amp;form=MFESRP&amp;publ=WLHMTAG&amp;crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1&lt;/a&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------
&lt;br&gt;&lt;br&gt;Yahoo! Groups Links
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To visit your group on the web, go to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://groups.yahoo.com/group/68HC12/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.yahoo.com/group/68HC12/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; Your email settings:
&lt;br&gt;&amp;nbsp; &amp;nbsp; Individual Email | Traditional
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To change settings online go to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://groups.yahoo.com/group/68HC12/join&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.yahoo.com/group/68HC12/join&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; (Yahoo! ID required)
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To change settings via email:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362468&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-digest@...&lt;/a&gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362468&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-fullfeatured@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To unsubscribe from this group, send an email to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362468&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; Your use of Yahoo! Groups is subject to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://docs.yahoo.com/info/terms/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.yahoo.com/info/terms/&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/VCC-and-Ground-tp26348076p26362468.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26357310</id>
	<title>Re: Re: VCC and Ground</title>
	<published>2009-11-15T00:24:51Z</published>
	<updated>2009-11-15T00:24:51Z</updated>
	<author>
		<name>Ruben Jönsson</name>
	</author>
	<content type="html">Standard pinout for a Hitachi 44780 (or compatible) based charcter display does 
&lt;br&gt;have GND at pin 1 and VCC at pin 2 so you do have these correct.
&lt;br&gt;&lt;br&gt;However, the third pin is Vee, which is the liquid crystal drive voltage and it 
&lt;br&gt;must be connected to get the display to show anything.
&lt;br&gt;&lt;br&gt;On standard LCD's the Vee voltage will have to be between Vcc and 0V and it is 
&lt;br&gt;temperature dependent which is why a potentiometer is mostly used. If the 
&lt;br&gt;display is always going to be used indoors were the temperature always is 
&lt;br&gt;within a narrow range you can use a voltage divider with resistors instead.
&lt;br&gt;&lt;br&gt;If the display is a temperature extended model Vee will have to be negative 
&lt;br&gt;(around -5V) and the potentiometer is connected between the negative voltage 
&lt;br&gt;and GND. A negative voltage can be created with a pulsed output, a couple of 
&lt;br&gt;capacitors and diodes, or, if you have an RS232 driver circuit, you can take 
&lt;br&gt;the negative voltage from there. Just make sure to filter it properly and 
&lt;br&gt;perhaps separate it with a diode, otherwise the contrast may be fluctuating 
&lt;br&gt;because the Vee voltage is changing.
&lt;br&gt;&lt;br&gt;For more information, take a look at this link:
&lt;br&gt;&lt;br&gt;&amp;lt;&lt;a href=&quot;http://www.repairfaq.org/filipg/LINK/F_Tech_LCD1.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.repairfaq.org/filipg/LINK/F_Tech_LCD1.html&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Good luck / Ruben
&lt;br&gt;&lt;br&gt;&amp;gt; Yes, I received the minidragon from Wytec, I know there are dedicated pins for
&lt;br&gt;&amp;gt; LCDs but I would like to connect my LCD on a breadboard directly to port A. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I've connected pin 1 of the LCD(14 pins) to GND of the minidragon and pin 2 to
&lt;br&gt;&amp;gt; VCC output but the LCD did not turn on so I wonder if the VCC and GND are
&lt;br&gt;&amp;gt; correct and whether I need a 10K pot.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks you for your help
&lt;br&gt;==============================
&lt;br&gt;Ruben Jönsson
&lt;br&gt;AB Liros Electronic
&lt;br&gt;Box 9124, 200 39 Malmö, Sweden
&lt;br&gt;TEL INT +46 40142078
&lt;br&gt;FAX INT +46 40947388
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26357310&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ruben@...&lt;/a&gt;
&lt;br&gt;==============================
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/VCC-and-Ground-tp26348076p26357310.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26352138</id>
	<title>Re: VCC and Ground</title>
	<published>2009-11-14T09:41:50Z</published>
	<updated>2009-11-14T09:41:50Z</updated>
	<author>
		<name>Thai-4</name>
	</author>
	<content type="html">Yes, I received the minidragon from Wytec, I know there are dedicated pins for LCDs but I would like to connect my LCD on a breadboard directly to port A. &amp;nbsp;
&lt;br&gt;&lt;br&gt;I've connected pin 1 of the LCD(14 pins) to GND of the minidragon and pin 2 to VCC output but the LCD did not turn on so I wonder if the VCC and GND are correct and whether I need a 10K pot.
&lt;br&gt;&lt;br&gt;Thanks you for your help
&lt;br&gt;&lt;br&gt;--- In &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26352138&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;, justin lucas &amp;lt;jlucas134@...&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The Minidragon plus2 board should have ports/pin already dedicated to the LCD.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; As posted earlier, check the schematic...did you purchase the board through wytec?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26352138&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;
&lt;br&gt;&amp;gt; From: bill@...
&lt;br&gt;&amp;gt; Date: Sat, 14 Nov 2009 08:16:07 -0500
&lt;br&gt;&amp;gt; Subject: Re: [68HC12] VCC and Ground
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Thai writes on 03:18 AM 11/14/2009
&lt;br&gt;&amp;gt; &amp;gt;I just purchased a Minidragon plus2 board and would like to 
&lt;br&gt;&amp;gt; &amp;gt;interface it with a 16x2 LCD display but I could not find where VCC 
&lt;br&gt;&amp;gt; &amp;gt;and GROUND on the board to power the LCD. Also do I really need a 
&lt;br&gt;&amp;gt; &amp;gt;10K POT to turn on the LCD or is it for contrast control
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Most displays do not need the pot and work find with 0V. Some older 
&lt;br&gt;&amp;gt; displays that did require it just needed a small negative voltage 
&lt;br&gt;&amp;gt; which few board have on them without generating it.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Sorry I don't know about the board's power to the LCD.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Bill
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;		 	 &amp;nbsp; 		 &amp;nbsp;
&lt;br&gt;&amp;gt; _________________________________________________________________
&lt;br&gt;&amp;gt; Windows 7: It works the way you want. Learn more.
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen:112009v2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen:112009v2&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/VCC-and-Ground-tp26348076p26352138.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26350362</id>
	<title>RE: VCC and Ground</title>
	<published>2009-11-14T06:01:11Z</published>
	<updated>2009-11-14T06:01:11Z</updated>
	<author>
		<name>justin lucas</name>
	</author>
	<content type="html">&lt;br&gt;The Minidragon plus2 board should have ports/pin already dedicated to the LCD.
&lt;br&gt;&lt;br&gt;As posted earlier, check the schematic...did you purchase the board through wytec?
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26350362&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;
&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26350362&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bill@...&lt;/a&gt;
&lt;br&gt;Date: Sat, 14 Nov 2009 08:16:07 -0500
&lt;br&gt;Subject: Re: [68HC12] VCC and Ground
&lt;br&gt;&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Thai writes on 03:18 AM 11/14/2009
&lt;br&gt;&amp;gt;I just purchased a Minidragon plus2 board and would like to 
&lt;br&gt;&amp;gt;interface it with a 16x2 LCD display but I could not find where VCC 
&lt;br&gt;&amp;gt;and GROUND on the board to power the LCD. Also do I really need a 
&lt;br&gt;&amp;gt;10K POT to turn on the LCD or is it for contrast control
&lt;br&gt;&lt;br&gt;Most displays do not need the pot and work find with 0V. Some older 
&lt;br&gt;displays that did require it just needed a small negative voltage 
&lt;br&gt;which few board have on them without generating it.
&lt;br&gt;&lt;br&gt;Sorry I don't know about the board's power to the LCD.
&lt;br&gt;&lt;br&gt;Bill
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;		 	 &amp;nbsp; 		 &amp;nbsp;
&lt;br&gt;_________________________________________________________________
&lt;br&gt;Windows 7: It works the way you want. Learn more.
&lt;br&gt;&lt;a href=&quot;http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen:112009v2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen:112009v2&lt;/a&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------
&lt;br&gt;&lt;br&gt;Yahoo! Groups Links
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To visit your group on the web, go to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://groups.yahoo.com/group/68HC12/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.yahoo.com/group/68HC12/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; Your email settings:
&lt;br&gt;&amp;nbsp; &amp;nbsp; Individual Email | Traditional
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To change settings online go to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://groups.yahoo.com/group/68HC12/join&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.yahoo.com/group/68HC12/join&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; (Yahoo! ID required)
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To change settings via email:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26350362&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-digest@...&lt;/a&gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26350362&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-fullfeatured@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; To unsubscribe from this group, send an email to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26350362&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;lt;*&amp;gt; Your use of Yahoo! Groups is subject to:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://docs.yahoo.com/info/terms/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.yahoo.com/info/terms/&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/VCC-and-Ground-tp26348076p26350362.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26349960</id>
	<title>Re: VCC and Ground</title>
	<published>2009-11-14T05:16:07Z</published>
	<updated>2009-11-14T05:16:07Z</updated>
	<author>
		<name>Bill_CT</name>
	</author>
	<content type="html">&amp;nbsp;&amp;gt; Thai writes on 03:18 AM 11/14/2009
&lt;br&gt;&amp;gt;I just purchased a Minidragon plus2 board and would like to 
&lt;br&gt;&amp;gt;interface it with a 16x2 LCD display but I could not find where VCC 
&lt;br&gt;&amp;gt;and GROUND on the board to power the LCD. Also do I really need a 
&lt;br&gt;&amp;gt;10K POT to turn on the LCD or is it for contrast control
&lt;br&gt;&lt;br&gt;Most displays do not need the pot and work find with 0V. &amp;nbsp;Some older 
&lt;br&gt;displays that did require it just needed a small negative voltage 
&lt;br&gt;which few board have on them without generating it.
&lt;br&gt;&lt;br&gt;Sorry I don't know about the board's power to the LCD.
&lt;br&gt;&lt;br&gt;Bill
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/VCC-and-Ground-tp26348076p26349960.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26349228</id>
	<title>Re: VCC and Ground</title>
	<published>2009-11-14T03:23:42Z</published>
	<updated>2009-11-14T03:23:42Z</updated>
	<author>
		<name>Heart Online</name>
	</author>
	<content type="html">most lcds that i know of either parllel or serial .. i believe there are different methods to interface them.  i prefer serial lcds to parllel though there are serial interfaces with pics placed on them to interface with the parellel ones or make it easier to interface in away.
&lt;br&gt;&lt;br&gt;the pot is most likely for controst control like u said another way to control it with out a pot is using the pwm.
&lt;br&gt;&lt;br&gt;hope this helps in anyway even if a littel .. check out the scematics online for ur minidragon that might show you where the vcc and gnd are
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;________________________________
&lt;br&gt;From: Thai &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26349228&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;discoverylight@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26349228&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;
&lt;br&gt;Sent: Sat, November 14, 2009 11:18:30 AM
&lt;br&gt;Subject: [68HC12] VCC and Ground
&lt;br&gt;&lt;br&gt;  
&lt;br&gt;Hello all,
&lt;br&gt;&lt;br&gt;I just purchased a Minidragon plus2 board and would like to interface it with a 16x2 LCD display but I could not find where VCC and GROUND on the board to power the LCD. Also do I really need a 10K POT to turn on the LCD or is it for contrast control 
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/VCC-and-Ground-tp26348076p26349228.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26348076</id>
	<title>VCC and Ground</title>
	<published>2009-11-14T00:18:30Z</published>
	<updated>2009-11-14T00:18:30Z</updated>
	<author>
		<name>Thai-4</name>
	</author>
	<content type="html">Hello all,
&lt;br&gt;&lt;br&gt;I just purchased a Minidragon plus2 board and would like to interface it with a 16x2 LCD display but I could not find where VCC and GROUND on the board to power the LCD. &amp;nbsp;Also do I really need a 10K POT to turn on the LCD or is it for contrast control 
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/VCC-and-Ground-tp26348076p26348076.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26313416</id>
	<title>Re: Re: timer ports, ping ultrasonic sensors + dragon bored 12</title>
	<published>2009-11-11T20:47:45Z</published>
	<updated>2009-11-11T20:47:45Z</updated>
	<author>
		<name>Petrescu</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;Two more sources for examples and comments about good programming 
&lt;br&gt;practice for HCS12:
&lt;br&gt;a) Jonathan Valvano page at Texas University ( Google for &amp;nbsp;that)
&lt;br&gt;b) &amp;nbsp;&lt;a href=&quot;http://gel.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gel.sourceforge.net/&lt;/a&gt;&amp;nbsp; GEL is a library &amp;nbsp;created by Stephane 
&lt;br&gt;Carrez ( &lt;a href=&quot;http://www.gnu-m68hc11.org/blog/?q=blog/2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu-m68hc11.org/blog/?q=blog/2&lt;/a&gt;)
&lt;br&gt;for HC11 and HC/HCS12. It is written for gcc, but it is good idea to 
&lt;br&gt;check some of your routines
&lt;br&gt;with different compiler(s).
&lt;br&gt;Regards,
&lt;br&gt;Yoan 
&lt;br&gt;&lt;br&gt;Heart Online wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; i dont have any examples at all ... &amp;nbsp;i found a template online some 
&lt;br&gt;&amp;gt; time ago .. i believe its called the haskell template has some 
&lt;br&gt;&amp;gt; librarys and codes especificaly writen for the hc12 &amp;nbsp;dose alot of the 
&lt;br&gt;&amp;gt; work for you for the atd and pwm ... the lcd on the dragon bored too ..
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; wish if there are more sample codes onlien for the 68hc12 .. but i 
&lt;br&gt;&amp;gt; cant find that much .. &amp;nbsp;unlike other microprocessers like the ateml or 
&lt;br&gt;&amp;gt; pics and its frustrating to be honest ..
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; so far i think the ultrasonic sensor by parllex works with on io pin 
&lt;br&gt;&amp;gt; on the dragon boards .. i found a code to have have a ( ultrasonic 
&lt;br&gt;&amp;gt; sensor ) functioning over the pwm ports .. but its not what i want 
&lt;br&gt;&amp;gt; sicne its not using the timer ports on the micro controller ..
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; i dont know what to do to be honest ot program it .. been looking at 
&lt;br&gt;&amp;gt; the data sheets and stuff its easy to make since of how it works
&lt;br&gt;&amp;gt; but i ronicly i &amp;nbsp;cant write in assembly or c using the code worrior 
&lt;br&gt;&amp;gt; enviorment to get it to work .. i'll give it a shot thoguh and then 
&lt;br&gt;&amp;gt; post again here.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ________________________________
&lt;br&gt;&amp;gt; From: nielsen.daniel &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26313416&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nielsen.daniel@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; &amp;lt;mailto:nielsen.daniel%40cmich.edu&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26313416&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt; &amp;lt;mailto:68HC12%40yahoogroups.com&amp;gt;
&lt;br&gt;&amp;gt; Sent: Wed, November 11, 2009 6:38:31 PM
&lt;br&gt;&amp;gt; Subject: [68HC12] Re: timer ports, ping ultrasonic sensors + dragon 
&lt;br&gt;&amp;gt; bored 12
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; I also have the Learn By Example book and I have a brand new SRF08 
&lt;br&gt;&amp;gt; sensor. I need to get the SRF08 interfaced to the Dragon 12 Board 
&lt;br&gt;&amp;gt; through the I2C ports. Anyone with advice or code?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/timer-ports%2C-ping-ultrasonic-sensors-%2B-dragon-bored-12-tp26299790p26313416.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26312389</id>
	<title>Re: timer ports, ping ultrasonic sensors + dragon bored 12</title>
	<published>2009-11-11T18:24:53Z</published>
	<updated>2009-11-11T18:24:53Z</updated>
	<author>
		<name>mculater12</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;There are some good video tutorials for working with CW in the Seneca College media library, here:
&lt;br&gt;&lt;a href=&quot;https://senema.senecac.on.ca/videos/407/assembly-and-c-language-programming-using-codewarrior&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://senema.senecac.on.ca/videos/407/assembly-and-c-language-programming-using-codewarrior&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;https://senema.senecac.on.ca/videos/404/examining-the-hcs12-dp256-using-codewarrior-memory-screen&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://senema.senecac.on.ca/videos/404/examining-the-hcs12-dp256-using-codewarrior-memory-screen&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;https://senema.senecac.on.ca/videos/405/lab-3-hand-assembly-and-code-warrior-debugger&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://senema.senecac.on.ca/videos/405/lab-3-hand-assembly-and-code-warrior-debugger&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;https://senema.senecac.on.ca/videos/418/lab-5-logic-and-shifting-operations-wuth-codewarrior&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://senema.senecac.on.ca/videos/418/lab-5-logic-and-shifting-operations-wuth-codewarrior&lt;/a&gt;&lt;br&gt;&lt;br&gt;Best regards,
&lt;br&gt;Carl Barnes
&lt;br&gt;www.technologicalarts.com
&lt;br&gt;Evaluate * Educate * Embed
&lt;br&gt;HC11 * HC12 * S12 * S12X
&lt;br&gt;&lt;br&gt;--- In &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26312389&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;, Heart Online &amp;lt;glby_0nline@...&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; i dont have any examples at all ...Â  i found a template online some time ago .. i believe its called the haskell template has some librarys and codes especificaly writen for the hc12Â  dose alot of the work for you for the atd and pwm ... the lcd on the dragon bored too .. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; wish if there are more sample codes onlien for the 68hc12 .. but i cant find that much ..Â  unlike other microprocessers like the ateml or pics and its frustrating to be honest ..
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; so far i think the ultrasonic sensor by parllex works with on io pin on the dragon boards .. i found a code to haveÂ have a ( ultrasonic sensor ) functioning over the pwm ports .. but its not what i want sicne its not using the timer ports on the micro controller .. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; i dont know what to do to be honest ot program it .. been looking at the data sheets and stuff its easy to make since of how it works 
&lt;br&gt;&amp;gt; but i ronicly iÂ  cant write in assembly or c using the code worrior enviorment to get it to work .. i'll give it a shot thoguh and then post again here.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ________________________________
&lt;br&gt;&amp;gt; From: nielsen.daniel &amp;lt;nielsen.daniel@...&amp;gt;
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26312389&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;68HC12@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Sent: Wed, November 11, 2009 6:38:31 PM
&lt;br&gt;&amp;gt; Subject: [68HC12] Re: timer ports, ping ultrasonic sensors + dragon bored 12
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Â  
&lt;br&gt;&amp;gt; I also have the Learn By Example book and I have a brand new SRF08 sensor. I need to get the SRF08 interfaced to the Dragon 12 Board through the I2C ports. Anyone with advice or code? 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/timer-ports%2C-ping-ultrasonic-sensors-%2B-dragon-bored-12-tp26299790p26312389.html" />
</entry>

</feed>
