free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Go to page  [1] 2 3
Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
Milz
Mon Dec 17 2007, 01:25AM
 User Offline
Registered Member #5022
Joined: Sat Dec 08 2007, 05:04AM

Posts: 12
Thanked 0 times in 0 posts
Im doing a project to control my laptop using the RC5 remote control, i already did the decoding program using a PIC18f452 .
Im new at this so plz bare with me
Anywho.. i was wondering how hard will it be to transfer the data through USB..
i did a little research abt it but seems a little tricky!
Do u think it can be done ?
I've heard about a PIC18 that has a USB port , will that make it easier for me ?



Control this!!
Back to top


Ajay
Mon Dec 17 2007, 02:14AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 3757
Thanked 697 times in 656 posts
well.. you can make use of a serial to USB converter IC like FT232 or buy a similar kind of module from market. so you can use your previously designed PIC board for your idea...
yes PIC series of 18F i think but not sure.. have USB onchip. you can use that one if you can find it

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top



This post has been thanked 1 time
 Milz 
Milz
Tue Dec 18 2007, 01:18AM
 User Offline
Registered Member #5022
Joined: Sat Dec 08 2007, 05:04AM

Posts: 12
Thanked 0 times in 0 posts
Thanks for the reply Ajay, great forum ..

Another question, should i make any changes to the VB code in case i was using USB instead of serial ?


Control this!!
Back to top


Ajay
Tue Dec 18 2007, 03:38AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 3757
Thanked 697 times in 656 posts
I cannot say.. if you can see an extra serial port after connecting that USB to serial dongle. then you will also see the serial port in the VB software. so the same software can be used..

I need to know more on how the dongle works with PC.. will it work as a virtual serial port or just like a normal USB.. most probably it will be a virtual serial port.

[ Edited Tue Dec 18 2007, 03:40AM ]

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


abhishek_h
Tue Dec 18 2007, 10:37AM
 User Offline
Registered Member #3901
Joined: Fri Sep 07 2007, 11:27PM

Posts: 19
Thanked 5 times in 5 posts
do you want to connect to serial port or usb? a usb->serial converter is available but not the other way. if u use usb to serial conv, then the usb port will become a virtual serial port. so you wont have to change your driver prog.
Back to top


Milz
Thu Dec 20 2007, 02:29AM
 User Offline
Registered Member #5022
Joined: Sat Dec 08 2007, 05:04AM

Posts: 12
Thanked 0 times in 0 posts
Thanks again ajay...
have a couple of questions regarding me using a pic18 instead of the AVR mcu ..

I dont really get the code since i dont know the language, what i dont understand is why we're checking if it's in Keyboard mode or Mouse mode on the mcu , isnt that VB's work ?

Bottom line, in order to get your VB code to work on my Pic18 code, what does my code needs to send/receive ?
Because up untill now, my code just decodes the signal into the standard RC5 command bits ...

This is more of a programming question so i might be in the wrong sub-forum, forgive me

Control this!!
Back to top


Milz
Thu Dec 20 2007, 02:40AM
 User Offline
Registered Member #5022
Joined: Sat Dec 08 2007, 05:04AM

Posts: 12
Thanked 0 times in 0 posts
do you want to connect to serial port or usb? a usb->serial converter is available but not the other way. if u use usb to serial conv, then the usb port will become a virtual serial port. so you wont have to change your driver prog.


I want to connect it to a usb port . There ARE serial to usb converters , but im not quite sure if that's the proper application!

Control this!!
Back to top


Ajay
Thu Dec 20 2007, 03:37AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 3757
Thanked 697 times in 656 posts
if your really want a proper way then make use of PIC with USB.. like PIC18F2550. Serial to USB is just a compromise kind of thing. also extra cost. If you can get a PIC with USB then will be good for you.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top



This post has been thanked 1 time
 Milz 
Milz
Thu Dec 20 2007, 04:05AM
 User Offline
Registered Member #5022
Joined: Sat Dec 08 2007, 05:04AM

Posts: 12
Thanked 0 times in 0 posts
Thanks again for replying ajay, and yes i think i will be using the Pic18f2550 , but for it to work along with your VB code , what will i need to do besides decoding the signal ??

as i said earlier, didnt quite understand your AVR code since i dont know the language.

What part of the decoded bits are you sending through the TX ?
What are you receiving through the RX?
.. and most importantly, why do u have a mouse/keyboard parts in this program ? does it matter? i thought one would send the command bits, along with the toggle bits, would be enough...

Thanks again !

Control this!!
Back to top


Ajay
Thu Dec 20 2007, 04:44AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 3757
Thanked 697 times in 656 posts
First i want to tell you the significance of toggle bit if you know then skip it
when you press a button on remote, let say toggle bit is 1 even of you put your hand in front of remote without releasing the button, toggle bit is still 1. So receiver knows that you have not released the key yet. toggle bit will change its state only after you release the button and press it again.

So in my application.. in mouse mode.. the navigation button for moving cursor up/down/left/right those keys has to be continuous so in my controller software i am reading mode bit before processing any key if it mouse mode i am not checking the toggle bit because button has to work continuously.
where as in keyboard mode or WMP control mode.. all keys like play/stop/next/forward etc are to be pressed only once..

whenever you change the mode from WMP to Mouse or Mouse to WMP control, mode bit is changed and VB software is informed about the changed mode.

The RC5 code i wrote is for 8051 not AVR

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top



This post has been thanked 1 time
 Milz 
Go to page  [1] 2 3  

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems