Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Reprogramming existing paintball circuit boards (PIC-based)

  1. #11
    I setup a test circuit for a PIC18F4550 this morning and played around with it a bit trying to get it to work with no success. I learned about decoupling capacitors while I was doing that.

    I was able to find some sample code to turn on an LED by manipulating registers on the PIC. I was able to compile and upload it to the PIC, but it just wouldn't work. I had to scavenge a crystal from some old electronics since I didn't have any. Tried running it using that crystal as the external clock and with the internal also and it didn't seem to work either way. I'm guessing it's something to do with the config setup in my code. I've found so many varying methods of how to configure the chip. It's a little frustrating.

  2. #12
    Junior Member
    Join Date
    Jun 2013
    Location
    Corvallis Oregon
    Posts
    6
    You may have better success starting out with a low end PIC such as a 12F675, they are easier to configure and the data sheet is not as daunting. I use the 18F4550 in my OEM stuff since I need a USB bootloader and I bought the CC8E compiler, but that is a powerhouse of a chip for the price. It also has a massive data sheet to match. My current 18F4550 OEM project is streaming audio, updating an OLED screen and running other time critical tasks all at the same time. I had to make use of both the low and high priority interrupt mechanisms to pull it off and it makes my brain hurt.

    The biggest issue with using PICs is not reading the data sheet carefully, getting the fuse settings right and getting the IO setup correctly since in many cases it defaults to analog or some other pin function. Generally you need to turn off analog and comparator modes to get plain digital IO.

    Jamie

  3. #13
    Quote Originally Posted by moorejl57 View Post
    You may have better success starting out with a low end PIC such as a 12F675, they are easier to configure and the data sheet is not as daunting. I use the 18F4550 in my OEM stuff since I need a USB bootloader and I bought the CC8E compiler, but that is a powerhouse of a chip for the price. It also has a massive data sheet to match. My current 18F4550 OEM project is streaming audio, updating an OLED screen and running other time critical tasks all at the same time. I had to make use of both the low and high priority interrupt mechanisms to pull it off and it makes my brain hurt.

    The biggest issue with using PICs is not reading the data sheet carefully, getting the fuse settings right and getting the IO setup correctly since in many cases it defaults to analog or some other pin function. Generally you need to turn off analog and comparator modes to get plain digital IO.

    Jamie
    Ahh.. Thanks. I did also find the help section in MPLAB explaining the config settings for each chip. I was using this one since I'm gonna throw it in the Pinguino board I'm making. I also have a PIC18F2550 that would work for the Pinguino as well (but that's the same datasheet as the 4550) and a PIC18F1220 and a PIC16F688. I guess that last one would be the simplest to start with.

    I'm guilty of frequently just jumping into the deep end and flailing about until I get my bearings. I must not like doing things the easy way. lol

  4. #14


    Played around with the PIC some more last night and got a basic blinking example working. I can't seem to get the external crystal working, though. Although, I did scavenge it from an old DSL modem board, so who knows if it works right? I need a 20MHz crystal to setup the Pinguino board, and all I've got is a 10MHz and 25MHz crystal, and a 20MHz oscillator package. That one would probably work, but I'd rather get a 20MHz crystal to keep the circuit simple. I'm gonna swing by Radio Shack and see what they've got.

    I find it odd that I can get assortments for resistors, capacitors, etc. online, but it's hard to find an assortment of crystals. I found one on amazon and one on ebay, but they'll take a while to get here.

  5. #15
    There are existing software packages for PIC-based boards, such as the Morlock code that Curt has kindly just open-sourced, as well as the Universal T Board code. There was also CodeX, which is custom software for the DM4 board, and was open-sourced under the GPL years ago. I can't find an active link to it online, but I have a copy of the code and will be happy to share it with anyone.

  6. #16
    Insider
    Join Date
    May 2012
    Posts
    1,182
    Was CodeX finished? I grabbed it off sourceforge when they were still around but I didn't think it was completed.

  7. #17
    Quote Originally Posted by Lurker27 View Post
    Was CodeX finished? I grabbed it off sourceforge when they were still around but I didn't think it was completed.
    Good question. I'm not entirely sure. I've looked over the source a little, but that was before I started learning about how PICs worked, so I didn't fully understand it at the time.

    It certainly wasn't a good sign that it came with a cheat code built-in. :/

Posting Permissions

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