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

Usb with PIC
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
lucky



Joined: 12 Sep 2003
Posts: 46
Location: South Coast - England

View user's profile Send private message Visit poster's website

FT232BM USB IC
PostPosted: Mon Oct 18, 2004 9:10 am     Reply with quote

FTDI FT232BM USB IC for �8. Simple to use, Cheep & very good. Just converts USB to RS232 then use the PIC as tho it was RS232. Cool [/url]
_________________
Lucky
www.mpic3.com - MPIC3 player project, Forum, Downloads, Online Shop
birumher



Joined: 28 Apr 2004
Posts: 10

View user's profile Send private message Send e-mail

PostPosted: Tue Oct 19, 2004 6:03 am     Reply with quote

I have used USBMOD2 from
http://www.ravar.net/R_ProductUSBs.htm
its using FT8U245AM chip. Maybe its little bit expensive but very easy to implement...

Here is CCS code I have used for first try...
PortB is DATA port ...
The code is for 16F877 but works fine with 18F452 if you change pin adresses...

Code:

#bit RXF = 7.2 // PORTC 2
#bit TXE = 7.1//PORTC 1
#bit WR = 7.0// PORTC 0
#bit RD = 8.3//PORTD 3
#byte B = 6 //PORT B


void main() {
   byte k;
   set_tris_b(0);
   set_tris_c(0b11111110);
   k = 65;
   RXF = 1;
   DELAY_MS(100);
   while (TRUE) {
      DELAY_MS(1);
      RXF = 1;
      WR = 1;
      RXF = 0;
      output_b(k); //WRITE to USB
      DELAY_MS(1);
      WR = 0;
      k += 1;
   }
}
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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