CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Using pin of USB as logic pin

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Louati



Joined: 26 Mar 2012
Posts: 16

View user's profile Send private message

Using pin of USB as logic pin
PostPosted: Thu Jun 14, 2012 9:56 am     Reply with quote

Hello Smile
I want to know if I can use the two pins D- and D+ of a pic 18f4550 as logic pins ?
I try but they didn't work :/
If someone can helpe me I will be so thankful.
Code:

#include <18f4550.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP,PUT
#USE DELAY(CLOCK=20MHZ, CRYSTAL)

#byte portc = 0xF82
#byte trisc = 0xF94

void main(void){
   portc=0b00000000;
   trisc=0b11111111;

   while(1){
         output_high(pin_c4);
         delay_ms(1000);
         output_low(pin_c4);
         delay_ms(1000);

         output_high(pin_c5);
         delay_ms(1000);
         output_low(pin_c5);
         delay_ms(1000);
   }
}
Ttelmah



Joined: 11 Mar 2010
Posts: 19541

View user's profile Send private message

PostPosted: Thu Jun 14, 2012 11:29 am     Reply with quote

Look at this thread. Less than a day ago....

<http://www.ccsinfo.com/forum/viewtopic.php?t=48443>
Louati



Joined: 26 Mar 2012
Posts: 16

View user's profile Send private message

PostPosted: Thu Jun 14, 2012 1:10 pm     Reply with quote

Ttelmah wrote:
Look at this thread. Less than a day ago....

<http://www.ccsinfo.com/forum/viewtopic.php?t=48443>

thanxs Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group