Discussion in "Project Addition or Changes" started by    Milz    Dec 17, 2007.
Mon Dec 17 2007, 02:55 pm
#1
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 ?
Mon Dec 17 2007, 03:44 pm
#2
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
 Milz like this.
Tue Dec 18 2007, 02:48 pm
#3
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 ?
Tue Dec 18 2007, 05:08 pm
#4
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, 05:10 pm ]
Wed Dec 19 2007, 12:07 am
#5
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.
Thu Dec 20 2007, 03:59 pm
#6
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
Thu Dec 20 2007, 04:10 pm
#7

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!
Thu Dec 20 2007, 05:07 pm
#8
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.
 Milz like this.
Thu Dec 20 2007, 05:35 pm
#9
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 !
Thu Dec 20 2007, 06:14 pm
#10
First i want to tell you the significance of toggle bit if you know then skip it :d
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
 Milz like this.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am
utaletxcyw
Wed Apr 17 2024, 10:21 am
Anthonyvab
Wed Apr 17 2024, 08:48 am
RobertCix
Wed Apr 17 2024, 06:46 am