BasicMicro - Forums

www.basicmicro.com
It is currently Mon May 21, 2012 12:12 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: HPWM is on pin 2 on the nano8
PostPosted: Mon Sep 26, 2011 6:46 am 
Offline
Guru

Joined: Sun Dec 20, 2009 10:52 pm
Posts: 76
Hi,

HPWM is on pin 2 instead of pin 3 on my nano8 (in the data sheet it's supposed to be on pin3)
The other thing is I can use the code HPWM with any pin P0, P1, P2, P3 it will take the last duty cycle I write (even if it's on P0 for exemple) but only pin2 will have the HPWM?

Thanks

PS it's not a problem, I am just surprised :-)

Chris


Top
 Profile  
 
 Post subject: Re: HPWM is on pin 2 on the nano8
PostPosted: Mon Sep 26, 2011 8:50 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
It appears the datasheet is wrong. P2 is the HPWM capable pin. There is only one CCP capable pin on the Nano 8. You can put any pin number you want in the HPWM command. If it isn't capable of HPWM it won't do anything.

I've let the document writer know to fix that right away. Sorry about the confusion.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: HPWM is on pin 2 on the nano8
PostPosted: Tue Sep 27, 2011 12:35 am 
Offline
Guru

Joined: Sun Dec 20, 2009 10:52 pm
Posts: 76
Thanks for the info.
There is one more strange thing, if I enter :

Code:
HPWM P0,50,25


I get the HPWM working on pin 2

If I enter :

Code:
HPWM P2,400,200
HPWM P1,100,50
HPWM P0,50,25


I get 153 kHz on pin 2 where I should get 16 kHz as if the last HPWM command was the good one even if the wrong pin was enter?

Thanks

Chris


Top
 Profile  
 
 Post subject: Re: HPWM is on pin 2 on the nano8
PostPosted: Tue Sep 27, 2011 10:06 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
The simple solution is don't run HPWM using pin numbers that aren't valid. :)

In this case I expect the HPWM command is ignoring the pin number because it knows there is only one pin that can run HPWM on the Nano8 and just executes the period and duty on p2 no matter what pin you specified.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: HPWM is on pin 2 on the nano8
PostPosted: Tue Sep 27, 2011 11:51 am 
Offline
Guru

Joined: Sun Dec 20, 2009 10:52 pm
Posts: 76
ok, I will :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO