|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Branching out -- I need some help getting started!
So I was thinking about it the other day, and I realized that I really don't know a whole lot about coding the PIC for other applications. I decided I was going to get a breadboard and a small microcontroller and try messing around on my own.
This, of course, lead to me realizing I had no idea what I was doing, so I sat around and thought... My high school had a trip to Japan last year, and one of the things we did was build a tiny robot. It essentially amounted to a couple of LEDs, two tiny motors, and some IR sensors. The tiny motors made two little brushes vibrate, which made the robot slowly scoot forward, and then it used the IR sensors to follow a line. If you hit the button on it, it would suddenly become a timer, flashing each light one minute, until all three blinked, and one motor ran, like a tiny alarm clock. Since they let us keep these "robots", I realized that I happen to have two (and maybe a few more) PIC16F819 processors sitting around, and a board that I can test it on (the board being the thing I just described). Pictures of the board are here and here. I'm still waiting for my PIC programmer in the mail, but while I was waiting, I looked up a lot of information on the processor. I was pretty psyched to realize that I understood how the robot worked, and that I also got pretty much how the code would be written, but I still don't know where to start actually writing it. The mcc18 compiler says that it is compatible in the readme, but I don't have p16f819.h Will I have to code this in assembly? Or is there some kind of C interpreter? Thanks! |
|
#2
|
||||
|
||||
|
Re: Branching out -- I need some help getting started!
Quote:
You need a different compiler to program the PIC16 in C. Regards, Mike |
|
#3
|
|||
|
|||
|
Re: Branching out -- I need some help getting started!
Well, if you're trying to branch out, you might want to try bra, bnz, bnov, bnc, bnn, bov....
|
|
#4
|
||||
|
||||
|
Re: Branching out -- I need some help getting started!
Uhhhh.... perhaps a few definitions for those abbrv.s?
|
|
#5
|
|||||
|
|||||
|
Re: Branching out -- I need some help getting started!
they're conditional branch instructions.
assembly language stuff. I got a chuckle out of the post! |
|
#6
|
|||
|
|||
|
Re: Branching out -- I need some help getting started!
There is a free C compiler called CC5X that has an 16F819.H file so you may be able to use it. You can do an internet search on CC5X to find it.
Also do a search on PICList and subscribe to it. When I last subscribed several years ago there was a VERY active community of PICers that would answer any question you had. Good luck, but be warned, this stuff is VERY addictive! Adam |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help needed for getting started! | chantilly_team | Programming | 4 | 27-10-2004 08:29 |
| Getting Started in Engineering | scuba_sm | Career | 5 | 10-02-2004 03:36 |
| hey need some help with writing a code please help me here | magical hands | Programming | 9 | 01-01-2004 21:46 |
| Getting Started | Cheese Head | Programming | 4 | 09-10-2002 22:24 |