From tim@teccs.biz Fri Jun 20 03:09:03 2008 Return-Path: Delivered-To: mailman-wheelwatcher@list.nubotics.com Received: (qmail 11768 invoked from network); 20 Jun 2008 03:09:03 -0000 Received: by simscan 1.2.0 ppid: 11759, pid: 11764, t: 0.7516s scanners: attach: 1.2.0 clamav: 0.88.3/m:39/d:1587 spam: 3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on tencom.noeticdesign.com X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00 autolearn=ham version=3.1.3 Received: from mail01.secureserverdot.com (216.14.208.15) by 69-30-73-98.dq1mn.easystreet.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 20 Jun 2008 03:09:02 -0000 Received: (qmail 39042 invoked by uid 89); 19 Jun 2008 23:08:06 -0400 X-Originating-IP: 69.146.197.136 Received: from unknown (HELO teccs) (tim@teccs.biz@69.146.197.136) by mail01.secureserverdot.com with SMTPA; 19 Jun 2008 23:08:06 -0400 From: "Tim Chapman" To: Date: Thu, 19 Jun 2008 21:07:08 -0600 Message-ID: <000e01c8d282$ba442a30$3c01a8c0@teccs> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6838 Importance: Normal Thread-Index: AcjSgrmF2scWuwxqRaywBudRsyjW2g== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Subject: [WheelWatcher] AVR ATMega at 8MHz X-BeenThere: wheelwatcher@list.nubotics.com X-Mailman-Version: 2.1.9a-pls Precedence: list Reply-To: WW-01/WW-02 WheelWatcher Encoder Support List List-Id: WW-01/WW-02 WheelWatcher Encoder Support List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2008 03:09:03 -0000 I am running the code found at http://www.nubotics.com/support/ww01/code/atmel/bascom/ww01_bascomavr_mon= ito r.bas.php I have an ATMega running on the internal oscillator at 8MHz. I am getting output showing all the values advancing just fine. I am getting no output to the servos. I checked the signals with my oscilloscope on PinD.4 and PinD.5 as well as PinC.2 and PinC.5. Nothing going on there at all. Will this work at 8MHz or is 16MHz required? Thank you for your time. Tim From plskeggs@noeticdesign.com Sat Jun 21 04:48:15 2008 Return-Path: Delivered-To: mailman-wheelwatcher@list.nubotics.com Received: (qmail 14509 invoked from network); 21 Jun 2008 04:48:15 -0000 Received: from dsl-66-78-76-138.ipns.com (HELO ?127.0.0.1?) (66.78.76.138) by 69-30-73-100.dq1mn.easystreet.com with SMTP; 21 Jun 2008 04:48:15 -0000 Message-ID: <485C880D.5090300@noeticdesign.com> Date: Fri, 20 Jun 2008 22:48:13 -0600 From: Pete Skeggs User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: WW-01/WW-02 WheelWatcher Encoder Support List References: <000e01c8d282$ba442a30$3c01a8c0@teccs> In-Reply-To: <000e01c8d282$ba442a30$3c01a8c0@teccs> Content-Type: multipart/alternative; boundary="------------080300000205090302050105" X-Content-Filtered-By: Mailman/MimeDel 2.1.9a-pls Subject: Re: [WheelWatcher] AVR ATMega at 8MHz X-BeenThere: wheelwatcher@list.nubotics.com X-Mailman-Version: 2.1.9a-pls Precedence: list Reply-To: WW-01/WW-02 WheelWatcher Encoder Support List List-Id: WW-01/WW-02 WheelWatcher Encoder Support List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2008 04:48:15 -0000 This is a multi-part message in MIME format. --------------080300000205090302050105 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Tim, Sorry you're having trouble. Did you modify the code at all? Exactly which atmega are you using? The first two lines after the comment header would need to be changed depending on which atmega and certainly regarding the 8MHz speed: |$regfile = "M16def.dat" $crystal = 8000000 ' was 16000000 | This would not explain why you would see no output at pins D4 and D5 but are seeing valid serial port output. The only reason that could be is that: - you changed the code in a bad way or, - you're not using an atmega16, but some other spin with slightly different internal peripherals or, - there is a wiring issue | | || As for other timing changes, timer 1 would be oscillating at fosc/64 = 125,000 Hz instead of 250,000, so you would need to set Capture1 = 2500 to get the PWM frequency to be 50Hz as required for servo control pulses. This would then mean that Max_servo should be 250, Min_servo 125, and Mid_servo 187, which are initialized before Main. You would also need to change the initialization of Out_r and Out_l in Setup to 250 and 125 respectively. -Pete ||Tim Chapman wrote: > I am running the code found at > http://www.nubotics.com/support/ww01/code/atmel/bascom/ww01_bascomavr_monito > r.bas.php > I have an ATMega running on the internal oscillator at 8MHz. > I am getting output showing all the values advancing just fine. > I am getting no output to the servos. I checked the signals with my > oscilloscope on PinD.4 and PinD.5 as well as PinC.2 and PinC.5. Nothing > going on there at all. > > Will this work at 8MHz or is 16MHz required? > > Thank you for your time. > > Tim > > _______________________________________________ > WheelWatcher mailing list > WheelWatcher@list.nubotics.com > http://list.nubotics.com/mailman/listinfo/wheelwatcher > > > --------------080300000205090302050105-- From tim@teccs.biz Sat Jun 21 16:41:50 2008 Return-Path: Delivered-To: mailman-wheelwatcher@list.nubotics.com Received: (qmail 13329 invoked from network); 21 Jun 2008 16:41:50 -0000 Received: by simscan 1.2.0 ppid: 13319, pid: 13324, t: 1.4723s scanners: attach: 1.2.0 clamav: 0.88.3/m:39/d:1587 spam: 3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on tencom.noeticdesign.com X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00 autolearn=ham version=3.1.3 Received: from mail01.secureserverdot.com (216.14.208.15) by 69-30-73-98.dq1mn.easystreet.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 21 Jun 2008 16:41:48 -0000 Received: (qmail 26397 invoked by uid 89); 21 Jun 2008 12:41:45 -0400 X-Originating-IP: 69.146.197.136 Received: from unknown (HELO teccs) (tim@teccs.biz@69.146.197.136) by mail01.secureserverdot.com with SMTPA; 21 Jun 2008 12:41:45 -0400 From: "Tim Chapman" To: "'WW-01/WW-02 WheelWatcher Encoder Support List'" Date: Sat, 21 Jun 2008 10:39:58 -0600 Message-ID: <000c01c8d3bd$71c08060$3c01a8c0@teccs> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6838 In-Reply-To: <485C880D.5090300@noeticdesign.com> Importance: Normal Thread-Index: AcjTWgaFcR5DuM1zQ2CdYPb8WwJIygAYy+Qg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Subject: Re: [WheelWatcher] AVR ATMega at 8MHz X-BeenThere: wheelwatcher@list.nubotics.com X-Mailman-Version: 2.1.9a-pls Precedence: list Reply-To: WW-01/WW-02 WheelWatcher Encoder Support List List-Id: WW-01/WW-02 WheelWatcher Encoder Support List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2008 16:41:50 -0000 I made all the changes you described and it works fine. Thank you very much! I was getting my output from port c.2 and port c.5. They gave no output even after I changed the code. With servos connected to port d.4 and port d.5 it works fine. Thanks again. TIm -----Original Message----- From: wheelwatcher-bounces@list.nubotics.com [mailto:wheelwatcher-bounces@list.nubotics.com] On Behalf Of Pete Skeggs Sent: Friday, June 20, 2008 10:48 PM To: WW-01/WW-02 WheelWatcher Encoder Support List Subject: Re: [WheelWatcher] AVR ATMega at 8MHz Tim, Sorry you're having trouble. Did you modify the code at all? Exactly=20 which atmega are you using? The first two lines after the comment header would need to be changed=20 depending on which atmega and certainly regarding the 8MHz speed: |$regfile =3D "M16def.dat" $crystal =3D 8000000 ' was 16000000 | This would not explain why you would see no output at pins D4 and D5 but = are seeing valid serial port output. The only reason that could be is = that: - you changed the code in a bad way or, - you're not using an atmega16, but some other spin with slightly=20 different internal peripherals or, - there is a wiring issue | | || As for other timing changes, timer 1 would be oscillating at fosc/64 =3D = 125,000 Hz instead of 250,000, so you would need to set Capture1 =3D = 2500=20 to get the PWM frequency to be 50Hz as required for servo control=20 pulses. This would then mean that Max_servo should be 250, Min_servo=20 125, and Mid_servo 187, which are initialized before Main. You would also need to change the initialization of Out_r and Out_l in=20 Setup to 250 and 125 respectively. -Pete ||Tim Chapman wrote: > I am running the code found at=20 > http://www.nubotics.com/support/ww01/code/atmel/bascom/ww01_bascomavr_ > monito > r.bas.php > I have an ATMega running on the internal oscillator at 8MHz. > I am getting output showing all the values advancing just fine. > I am getting no output to the servos. I checked the signals with my > oscilloscope on PinD.4 and PinD.5 as well as PinC.2 and PinC.5. = Nothing > going on there at all. > > Will this work at 8MHz or is 16MHz required? > > Thank you for your time. > > Tim > > _______________________________________________ > WheelWatcher mailing list > WheelWatcher@list.nubotics.com=20 > http://list.nubotics.com/mailman/listinfo/wheelwatcher > > > =20 From tim@teccs.biz Mon Jun 30 01:52:44 2008 Return-Path: Delivered-To: mailman-wheelwatcher@list.nubotics.com Received: (qmail 28803 invoked from network); 30 Jun 2008 01:52:44 -0000 Received: by simscan 1.2.0 ppid: 28789, pid: 28794, t: 1.4969s scanners: attach: 1.2.0 clamav: 0.88.3/m:39/d:1587 spam: 3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on tencom.noeticdesign.com X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00 autolearn=ham version=3.1.3 Received: from mail01.secureserverdot.com (216.14.208.15) by 69-30-73-98.dq1mn.easystreet.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 30 Jun 2008 01:52:43 -0000 Received: (qmail 93844 invoked by uid 89); 29 Jun 2008 21:52:24 -0400 X-Originating-IP: 69.146.197.136 Received: from unknown (HELO teccs) (tim@teccs.biz@69.146.197.136) by mail01.secureserverdot.com with SMTPA; 29 Jun 2008 21:52:24 -0400 From: "Tim Chapman" To: "'WW-01/WW-02 WheelWatcher Encoder Support List'" Date: Sun, 29 Jun 2008 19:52:40 -0600 Message-ID: <000201c8da53$fb22ed10$3c01a8c0@teccs> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6838 Importance: Normal Thread-Index: AcjTWgaFcR5DuM1zQ2CdYPb8WwJIygG+Y5iA In-Reply-To: <485C880D.5090300@noeticdesign.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Subject: Re: [WheelWatcher] AVR ATMega at 8MHz X-BeenThere: wheelwatcher@list.nubotics.com X-Mailman-Version: 2.1.9a-pls Precedence: list Reply-To: WW-01/WW-02 WheelWatcher Encoder Support List List-Id: WW-01/WW-02 WheelWatcher Encoder Support List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2008 01:52:45 -0000 Pete, I really appreciate your assistance and need to ask you for another = similar favor. I am new to microcontrollers and am having a hard time = understanding the code for the wheelwatcher. I am weak on timers and PWM as they are implemented on the microcontrollers. Would you be so kind as to = explaing the code to me. I don't understand what the 128usec business is about, = etc. An overview of how this works would really be helpful. The comments in = the code just aren't seeming to gel and make complete sense to me. If you would rather that I ask specific questions, I can go that route. Thank you again, Tim -----Original Message----- From: wheelwatcher-bounces@list.nubotics.com [mailto:wheelwatcher-bounces@list.nubotics.com] On Behalf Of Pete Skeggs Sent: Friday, June 20, 2008 10:48 PM To: WW-01/WW-02 WheelWatcher Encoder Support List Subject: Re: [WheelWatcher] AVR ATMega at 8MHz Tim, Sorry you're having trouble. Did you modify the code at all? Exactly=20 which atmega are you using? The first two lines after the comment header would need to be changed=20 depending on which atmega and certainly regarding the 8MHz speed: |$regfile =3D "M16def.dat" $crystal =3D 8000000 ' was 16000000 | This would not explain why you would see no output at pins D4 and D5 but = are seeing valid serial port output. The only reason that could be is = that: - you changed the code in a bad way or, - you're not using an atmega16, but some other spin with slightly=20 different internal peripherals or, - there is a wiring issue | | || As for other timing changes, timer 1 would be oscillating at fosc/64 =3D = 125,000 Hz instead of 250,000, so you would need to set Capture1 =3D = 2500=20 to get the PWM frequency to be 50Hz as required for servo control=20 pulses. This would then mean that Max_servo should be 250, Min_servo=20 125, and Mid_servo 187, which are initialized before Main. You would also need to change the initialization of Out_r and Out_l in=20 Setup to 250 and 125 respectively. -Pete ||Tim Chapman wrote: > I am running the code found at=20 > http://www.nubotics.com/support/ww01/code/atmel/bascom/ww01_bascomavr_ > monito > r.bas.php > I have an ATMega running on the internal oscillator at 8MHz. > I am getting output showing all the values advancing just fine. > I am getting no output to the servos. I checked the signals with my > oscilloscope on PinD.4 and PinD.5 as well as PinC.2 and PinC.5. = Nothing > going on there at all. > > Will this work at 8MHz or is 16MHz required? > > Thank you for your time. > > Tim > > _______________________________________________ > WheelWatcher mailing list > WheelWatcher@list.nubotics.com=20 > http://list.nubotics.com/mailman/listinfo/wheelwatcher > > > =20