Hello,
Am new to programming and cant get my 16f877a to do anything. Any help out there?
Hello,
Am new to programming and cant get my 16f877a to do anything. Any help out there?
Not without knowing if you're trying to get your 877a to taste like cookies in the oven, fetch a stick, or if you're actually trying to program it....The '877 that is...not the stick.
http://www.picbasic.co.uk/forum/showthread.php?t=1742
Last edited by skimask; - 15th June 2008 at 01:01.
Re-Read Post #2 instead of PM'ing me...
You'll get a lot more help that way.
Ok here is the simple code I am trying to run. It compiles but the output doesnt come on
#include <pic.h>
__config (PCMDIS & IESODIS & BORDIS & UNPROTECT & MCLRDIS & PWRTEN & WDTDIS & INTIO); //I don’t know what is supposed to go in this, which is the main problem.
main(){
PORTA = 0;
//CMCON0 = 7; //would not compile with these two statements in
//ANSEL = 0;
TRISA4 = 0;
TRISA5 = 0;
while(1==1){
RA4 = 1;
}
}
Do I need the config statement or not?
Last edited by oreo; - 17th June 2008 at 12:56.
Let's see...
I don't think the bulk of the above code will compile using MeLabs PICBASIC PRO, like the writing at the top of the page specifies these forums are generally for.
I could be wrong...
Please tell me if I'm wrong...
I don't like to be wrong...
I don't mind being wrong...
But I still don't like it...
I guess you were fetching a stick from the oven...
Last edited by skimask; - 17th June 2008 at 14:01.
Oreo, it's not clear to us what you are using for a compiler, and for programming, and what physical platform you have for your '877A.
Is your platform just an 877A and a solderless breadboard, or do you have a kit or development board of some sort?
If you're using PIC BASIC or PIC BASIC PRO and haven't already done so, you might consider getting something like the MELabs X-1 board. It's available assembled or as a kit. One nice thing about packages like this is that they often come with several simple routines already tested, working, and you can use them as starting points to learn to do more.
The nice thing about starting with simple, known-good programs is that you can start tinkering with them. As soon as something doesn't work, you can stop and look at your code and learn from what didn't work because you know that the core from which you started did work.
Russ
N0EVC, xWB6ONT, xWN6ONT
"Easy to use" is easy to say.
I appreciate all of the positive comments or suggestions. But as skimask pointed out I started at the wrong forum and completely wasted his/your valuable time. I want to thank Bruce and Russmartin and sonicm , they seemed to want to help.
I will try and find the correct forum and not waste your time any more. This will be my last post here.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks