Go to Post Coming soon to an Earth near you; an Australian team (or 2). Stay tuned. - Elgin Clock [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-05-2003, 09:51
Andrew Andrew is offline
Registered User
#0356
 
Join Date: May 2002
Location: Little Rock, AR
Posts: 393
Andrew is a name known to allAndrew is a name known to allAndrew is a name known to allAndrew is a name known to allAndrew is a name known to allAndrew is a name known to all
Why can't you use 255 in PWM?

I've heard that most people don't allow their PWMs to go to 255 and that it has something to do with the serout command. Nowhere in the serout documentation is there a reason given, so I assumed it had something to do with the RC.

Is it because IFI uses 0xff, 0xff as a marker for start of data sequence? If 2 PWMs next to each other in the serial stream were to max out at the same time, it would appear to the master uP as if the data stream had restarted and the remaining variables would be shifted.

If someone knows anything different, I'd appreciate a heads up.
  #2   Spotlight this post!  
Unread 27-05-2003, 10:54
Manoel's Avatar
Manoel Manoel is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Porto Alegre, RS, Brazil
Posts: 608
Manoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond repute
Send a message via ICQ to Manoel Send a message via MSN to Manoel
Re: Why can't you use 255 in PWM?

Quote:
Originally posted by Andrew
Is it because IFI uses 0xff, 0xff as a marker for start of data sequence? If 2 PWMs next to each other in the serial stream were to max out at the same time, it would appear to the master uP as if the data stream had restarted and the remaining variables would be shifted.
That's exactly it.
Code:
 Serout USERCPU, OUTBAUD, 
[255,255,(PWM1),relayA,(PWM2),relayB,(PWM3),(PWM4), (...)]
__________________
Manoel Flores da Cunha
Mentor
Brazilian Machine
Team # 383
  #3   Spotlight this post!  
Unread 27-05-2003, 20:21
Kevin A Kevin A is offline
In Hibernation
#0481 (DART)
Team Role: Mechanical
 
Join Date: Jan 2003
Rookie Year: 2000
Location: Richmond, CA
Posts: 244
Kevin A will become famous soon enough
Send a message via AIM to Kevin A
last year our programmer didnt know this...i went full in one direction and the robot stops, jerks, goes, stops jerks...
  #4   Spotlight this post!  
Unread 28-05-2003, 19:20
Lloyd Burns Lloyd Burns is offline
Registered User
FRC #1246 (Agincourt Robotics)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Toronto
Posts: 292
Lloyd Burns is an unknown quantity at this point
And it would have to be in the Serout from the Robot Controller that it went haywire, as the OI is programmed to max out any analog input at 254, unless there is no resistor on the input at all, which goes to 127.

The Serin statement uses the same synchronization method as the Serout, not that a programmer needs that information.
  #5   Spotlight this post!  
Unread 29-05-2003, 14:50
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
yeah, it sure was fun, making the robot dance, until we realized that...

good rule of thumb, don't let anything get above 254, ever. well, as long as you're the programmer at least .
__________________
AIM --> Woloi
Email --> ian@woloschin.com
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pwm 13-15 wayne 05 Programming 2 04-10-2003 12:08
PWM and burning out motors patrickrd Technical Discussion 7 19-06-2003 15:30
Limiting PWM in pbasic archiver 2001 4 24-06-2002 00:38
Need help with 255 Variable Joseph F Programming 18 26-02-2002 14:49
Pbasic argument question... Ghetto_Child Programming 10 18-02-2002 09:23


All times are GMT -5. The time now is 12:12.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi