Society of Robots - Robot Forum

Software => Software => Topic started by: sambhav on December 27, 2006, 03:18:12 AM

Title: Programs fo PIC16F877
Post by: sambhav on December 27, 2006, 03:18:12 AM
hi..
i m a beginner and working with the PIC for the 1st time..
We are using PIC16F877 for our project..
we will be using assembly level programming using MPLAB
Can u plz provide us the assembly code for the following:
1. Line follower using IR sensors
2.Obstacle detection using ultrasonic
3.rpm measurement using IR sensors.

Also.. will the memory be sufficient..??
if not how can we integrate extra memory..??
Title: Re: Programs fo PIC16F877
Post by: Admin on December 27, 2006, 10:26:28 AM
hi sambhav

so I use the PIC16F877 for like 90% of my bots . . .
why do you want to program in assembly? why not program in C, and just use a compiler to get assembly?

i can send you my compiled assembly files, but they arent going to make much sense . . . let me know if this is what you want.

doing a quick google search i found this book:
Interfacing PIC Microcontrollers: Embedded Design by Interactive Simulation (http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FInterfacing-PIC-Microcontrollers-Interactive-Simulation%2Fdp%2F0750680288%2Fsr%3D11-1%2Fqid%3D1167236498&tag=societyofrobo-20&linkCode=ur2&camp=1789&creative=9325)<img src="http://www.assoc-amazon.com/e/ir?t=societyofrobo-20&amp;l=ur2&amp;o=1" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />

it says it has many examples of assembly source code for PIC16F877
Title: Re: Programs fo PIC16F877
Post by: sambhav on December 27, 2006, 11:30:42 AM
hi sambhav

so I use the PIC16F877 for like 90% of my bots . . .
why do you want to program in assembly? why not program in C, and just use a compiler to get assembly?

i can send you my compiled assembly files, but they arent going to make much sense . . . let me know if this is what you want.

doing a quick google search i found this book:
Interfacing PIC Microcontrollers: Embedded Design by Interactive Simulation (http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FInterfacing-PIC-Microcontrollers-Interactive-Simulation%2Fdp%2F0750680288%2Fsr%3D11-1%2Fqid%3D1167236498&tag=societyofrobo-20&linkCode=ur2&camp=1789&creative=9325)<img src="http://www.assoc-amazon.com/e/ir?t=societyofrobo-20&amp;l=ur2&amp;o=1" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />

it says it has many examples of assembly source code for PIC16F877

Is it easy to program in C or assembly..
I referred to some tutorials in assembly and found dem easy...
so plz tell me.. also if possible can u send the compiled assembly files or the c code files u mentioned to me...
also where can i get online tutorials for programming the PIC using C ??
Title: Re: Programs fo PIC16F877
Post by: Admin on December 27, 2006, 07:17:47 PM
i uploaded my PIC 16F877 source code here:
http://www.societyofrobots.com/downloads/fuzzy_C_source_code.zip

the code was written for this robot:
http://www.societyofrobots.com/robot_omni_wheel.shtml

has source for sonar, sharp IR, 2D mapping, trig lookup tables, servos, timers, and interrupts.

enjoy!
Title: Re: Programs fo PIC16F877
Post by: Militoy on January 04, 2007, 10:12:14 PM
Quote
doing a quick google search i found this book:
Interfacing PIC Microcontrollers: Embedded Design by Interactive Simulation

it says it has many examples of assembly source code for PIC16F877

This looks to be a good book, Admin - From your comment though, it sounds like this is just one that came up in a search? If so - have you heard positive comments on the content; or, can anyone on the board that has a copy reccommend the book for PIC users (I'm using both 16F and 18F PICs)?

Another book - one that I use and highly reccommend - is "PIC Microcontroller: An Introduction to Software & Hardware Interfacing" by Han-Way Huang.
Title: Re: Programs fo PIC16F877
Post by: Hal9000 on January 05, 2007, 04:40:16 AM
Again, do a serach for the PIC book in the evil genius series. It's so good. Covers C and assembly (although prodominantly C). It relies on MPLab and the stupid PIC kit 1 or whatever the heck it is. So expensive.
Title: Re: Programs fo PIC16F877
Post by: JesseWelling on January 05, 2007, 05:41:17 AM
as a side note I have a Cerebellum that I don't use any more. if any one wants to pay for the shipping I'll send it to you.
It uses the PIC16F877..... :P
Title: Re: Programs fo PIC16F877
Post by: trigger on January 05, 2007, 03:35:24 PM
as a side note I have a Cerebellum that I don't use any more. if any one wants to pay for the shipping I'll send it to you.
It uses the PIC16F877..... :P

I'll take you up on that. How much is the shipping?
you can email me directly at sraevsky at yahoo dot com
Title: Re: Programs fo PIC16F877
Post by: JesseWelling on January 05, 2007, 04:16:11 PM
I'd have to know where you are at.....
Title: Re: Programs fo PIC16F877
Post by: trigger on January 05, 2007, 09:17:13 PM
I'd have to know where you are at.....

I'm in socal. I'll leave you a PM on the forum with my address.