Go to Post I've completely figured [the hint] out: Robots will have to move around, and also displace objects in order to score points. What do I win? - pfreivald [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-02-2007, 22:53
kitscuzz's Avatar
kitscuzz kitscuzz is offline
Not alotta posts
AKA: Kit
FRC #1389 (Worst Case Scenario)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Home
Posts: 47
kitscuzz will become famous soon enough
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   Spotlight this post!  
Unread 23-02-2007, 23:43
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Branching out -- I need some help getting started!

Quote:
Originally Posted by kitscuzz View Post
...The mcc18 compiler says that it is compatible in the readme,...
I think if you re-read that readme you will find that the assembler is compatible. The C18 compiler is only for the PIC18 family.

You need a different compiler to program the PIC16 in C.

Regards,

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #3   Spotlight this post!  
Unread 24-02-2007, 14:11
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
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....
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
  #4   Spotlight this post!  
Unread 24-02-2007, 18:30
kitscuzz's Avatar
kitscuzz kitscuzz is offline
Not alotta posts
AKA: Kit
FRC #1389 (Worst Case Scenario)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Home
Posts: 47
kitscuzz will become famous soon enough
Re: Branching out -- I need some help getting started!

Quote:
Originally Posted by Shinigami2057 View Post
Well, if you're trying to branch out, you might want to try bra, bnz, bnov, bnc, bnn, bov....
Uhhhh.... perhaps a few definitions for those abbrv.s?
  #5   Spotlight this post!  
Unread 24-02-2007, 18:43
MrForbes's Avatar
MrForbes MrForbes is offline
Registered User
AKA: Jim
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Sierra Vista AZ
Posts: 5,959
MrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond repute
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   Spotlight this post!  
Unread 25-02-2007, 23:35
adamdb adamdb is offline
Registered User
#1583
 
Join Date: Feb 2005
Location: Parker, CO
Posts: 63
adamdb has a spectacular aura aboutadamdb has a spectacular aura aboutadamdb has a spectacular aura about
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
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 01:48.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi