Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 40

Thread: USB Car Controller

  1. #21
    Newbie
    Join Date
    Jan 2005
    Posts
    48
    Quote Originally Posted by rando
    This kit just provides a bootloader and an integrated USB->RS232 dongle so it looks like a COM port to your PC. Microchip has posted demo code on their website to implement both of these capabilities. You'd just need to relocate their USB code and your code to work with the bootloader and play nicely together. That's more or less the same thing you'll be doing with the board you picked -- if you try to change the firmware.

    In all the strait PIC solution will be a bit more complicated, but not terribly so. You might also have to borrow or build a programmer to flash the PIC with a bootloader the first time.
    Hi, thanks for ur suggestions, but do you have a link to the code, cheers

  2. #22
    Registered User
    Join Date
    May 2003
    Posts
    1,736
    The code is here.

    http://www.microchip.com/stellent/id...pnote=en021631

    You will need to get the flashable USB PIC, the PIC18F2455, PIC18F2550, PIC18F4455 or the PIC18F4550.

    This code example emulate a com port over USB.

    The bootloader, you can also get them from microchip with the bootloader windows application example, done in VB as far as I can remember.

    You will need to adapt the asm code for the pic you chosen. Not hard to do, just plenty of reading and understanding the datasheet.

    Learn to use asm, they are much more flexible for critical application. Beside alot of the example are in asm you will miss out alot.

  3. #23
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    Learning PIC assembly isn't much of a challenge. For the simple tasks he has in mind, it shouldn't be a big deal. Just the same, it's nice to know you've got access to a C compiler. At the very least you can study the code it produces to get an idea how to do things in assembly.

    Also you can get more information about Microchip USB solutions by clicking on the USB link from the Microchip home page.

  4. #24
    Registered User
    Join Date
    May 2003
    Posts
    1,736
    Quote Originally Posted by rando
    Learning PIC assembly isn't much of a challenge. For the simple tasks he has in mind, it shouldn't be a big deal.
    Well yes, but learning asm can be difficult for some depending on their experience in programming. Alot of application programmer thinks its hard, EE guys find it much easier for some reason.

    For the simple tasks he has in mind, it shouldn't be a big deal.

    The simple task can easily turn into a complicated task. It can be surprising how difficult it can get. Learning the PIC itself can be a headache already, learning to program it is another headache.


    Not to put you off Pilt, it can be all learnt. My advice is to learn the asm first then go into C when your project grows bigger.

  5. #25
    Registered User
    Join Date
    May 2003
    Posts
    1,736
    Quote Originally Posted by rando
    Learning PIC assembly isn't much of a challenge.
    or did you meant C. Try and do a multiply in C, then try it in asm. I can already see a challenge in asm there.

  6. #26
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    I mean't assembly. The PIC assembly isn't particularly complex -- that's part of its appeal. The instruction set is small and the addressing modes are few. This makes things a bit cumbersome but not complicated.

    As far as multiplication goes, the 16-bit PIC core of the 18F chips have a hardware multiplier. For the older 14-bit cores, multiplication is trivially implemented by a sequence of shifts and adds. That's where looking at the assembly produced by the C compiler can help out.

  7. #27
    Newbie
    Join Date
    Jan 2005
    Posts
    48
    Quote Originally Posted by rando
    I mean't assembly. The PIC assembly isn't particularly complex -- that's part of its appeal. The instruction set is small and the addressing modes are few. This makes things a bit cumbersome but not complicated.

    As far as multiplication goes, the 16-bit PIC core of the 18F chips have a hardware multiplier. For the older 14-bit cores, multiplication is trivially implemented by a sequence of shifts and adds. That's where looking at the assembly produced by the C compiler can help out.
    Just been looking at the USB stuff on the microchip website and it doesnt look too difficult to implement, the bootloader looks good as well so im probably gonna get one the parts for this and have a go at it.

    I assume i would need a programmer to program the PIC the first time as they dont have a bootloader in them when shipped?

    Im not sure on how i will program it yet. I have done ASM but it was about two years ago and i didnt find it to difficult, but im doing C as part of my course at the moment so im tempted to go that route

    Wots the difference between the 16 bit and 18 bit cores? Apart from two bits!!

  8. #28
    Maximum Bitrate kiltjim's Avatar
    Join Date
    Feb 2004
    Location
    PA, USA
    Posts
    805
    Not to step backward here, but I just read the programmer's guide for an our ad a half, and I stil on't undersad how to turn a digital pin on and off, as in triggering a relay.

    Anybody know how to do it? I looked at their test software, and it looks pretty useless to me.
    2000 Subaru OBS

    Dell P3 @ 900 Mhz
    7" Lilliput TS w/DigitalWW in-dash mount
    80GB External HD

    I am Zero Bitrate....

  9. #29
    Newbie
    Join Date
    Jan 2005
    Posts
    48
    Quote Originally Posted by kiltjim
    Not to step backward here, but I just read the programmer's guide for an our ad a half, and I stil on't undersad how to turn a digital pin on and off, as in triggering a relay.

    Anybody know how to do it? I looked at their test software, and it looks pretty useless to me.
    For example, setting port PIN_A1 high would require the following string of bytes:
    0x03, 0xA6, 0x29, 0x01, 0x8D

    Example Visual C++ source code for communicating with the DLP-2232PB via the Token I/O firmware is also available
    for download. The windows source code also contains the port pin definitions listed above.

  10. #30
    Newbie
    Join Date
    Jan 2005
    Posts
    48
    Well i bought one of these things, still waiting for it to arrive...

    I now have the C code for the thing and it looks pretty easy to modify so when i get the thing i will add all the code for the features i want to add

    I also have the visual basic code for controling the thing so it should be pretty easy to add to road runner! Just got to wait for him to make the OBD II part and should be easy to modify to make it work!

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Just for laught: Computer and Car
    By MatrixPC in forum Off Topic
    Replies: 20
    Last Post: 01-05-2005, 10:25 PM
  2. Real Time Car tracking now working!
    By Magpie in forum GPS
    Replies: 25
    Last Post: 10-27-2004, 05:08 AM
  3. FS: microtouch USB controller: 4 wire resistive
    By robiewp in forum Classified Archive
    Replies: 0
    Last Post: 05-24-2004, 11:25 PM
  4. Keyless Entry Shutdown Controller
    By Sinorm in forum Power Supplies
    Replies: 2
    Last Post: 04-07-2004, 09:30 PM
  5. Car Stereo Installation Video's for Sale
    By johnram in forum Classified Archive
    Replies: 2
    Last Post: 09-05-2002, 11:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •