Does anyone has source code of good working example for PIC16F84A?
I need to test my soft and hardware.
Really appreciate.
Printable View
Does anyone has source code of good working example for PIC16F84A?
I need to test my soft and hardware.
Really appreciate.
Read the PBP docs, this is the "hello world" program, included in the user manual.
wire a LED on Portb pin like this:
http://www.maicas.net/bot/pic16f84.gif
and compile this lines. . .
Symbol LED = portb.0
Trisb=0 ' Make portb as output
Loop:
high LED
Pause 500
Low LED
Pause 500
Goto Loop
END
Simple question - simple answer.
No one tell me that I can use PIC simulator software that can easy to help
in analyzing program's errors.
______________________________
To Whom who study Taxes.
Communism is 100% taxes and NO salaries.
Socialism is 75% taxes and small salaries.
Capitalism is 25% taxes and salary what you deserve.
Crime society is 0% taxes, full salary and too much blood.
No one told me either!
Help me discover what else I can do with my PBP system besides write program, hope to compile, compiles, doesn't do what I thought it should, stare at program for a long time, try again and again until I realize that programming with intention is not the same as programming with instruction.
Where is this simulator you speak of? Hmmm?
Good morning,
There is no simulator for PicBasicPro. There is, however, a simulator for other forms of the PicBasic language.
If either of you are looking for a quick way to write a program that works the first time then I think you are dreaming. I have been on this for since 2004. I have found that by investing the time in looking at the problems other members have posted I have learned how to program. Does every program work the first time. NO! You make mistakes wiring something up. You forget to Capitalize the DEFINES. You can make many types of mistakes. That's all part of the learning curve. I spent an entire 48 hour weekend just writing, testing,writing,testing code for an RTC handling daylight savings time. I am not a professional programmer. My first really big project was designed to be done in 4 months. It took more than twice that because I had alot of learning to do.
There are many great people on this forum that are more than willing to help you with your problems. As for a simple program for the 16F84A, start with blinking an LED. There are many examples of how to do this. I beleive one of them is in the manual. We do require that people asking for help to make some effort.
I personnally have purchased several books, one of which is entitled "Programming PICs in Basic" by Chuck Hellebuyck. This has been like a bible to me. I started with Basic Stamps and worked my way over to PICs.
It does take a lot of time if you only do this as a hobby. I do most of work on the weekends so I sit back with a cup of coffee and read the posts here. I also read them in the morning before work and then before I retire for the evening. We do have some less than patient people here but their intentions are good.
Don't get discouraged. In the long run its fun and educational and in some cases it can be financially rewarding. I have sold quite a few of my projects to customers of my alarm business!
BobK
I used Pic IDE Simulator ver 5.33 from www.oshonsoft.com.
It is free from charge for trial period and you can buy a licence to use during
your life time with new soft from this company.
Regards
Nice Simulator!!!
For another compiler...
Here's an assignment statement for you.
See if you can figure it out how it works.
or maybeCode:MeLabs PICBASICPRO <> Proton Basic
How aboutCode:MeLabs PicBasicPro != Proton Basic
Code:If MeLabs PicBasicPro = Proton Basic Then
Pigs = might_fly
EndIf
Methinks there is a language problem
"Pic Basic Compiler" and it's examples have not translated accurately.
This forum is for MeLabs Pic Basic Compiler. Maybe mail Vladimir Soso and ask him exactly which compiler he has been developing with.
HTH
__
Here is conflict beetwen previous installed Pic Basic Compiler and Pic Basic Pro Compiler so MicroCode Studio PLUS read setting of PIC Basic Compiler that previously works with Micro Code Studio that only have one targeting processor PIC16F628.
Regards
Or ask Mr. Sonsivri where he gets his software
Hi, All
IF you want to simulate ( lol ) ...
no problem using MPLAB and its MPSIM tool !!! Exellent tool to finely tune timings ...BTW.
no problem nor to use EasyPic Boards from Mikroelektronika ... you can also have very nice developpement satellites ...
Just compile and transfer your HEX on their Programmer.
Ah ... yes, you'd want whisles and bells ... small drawings, etc,etc ... even conveyor belt !!!
No problems then to use National's MULTISIM , ... just give the $$$$$$$$$$$ !!!
I'd forget PROTEUS ...
Nothing to simulate ( lol ) PbP produced code ??? ... really ???
Alain
"ask Mr. Sonsivri where he gets his software"
Who is he? Never heard of this person.
"Nothing to simulate ( lol ) PbP produced code ??? ... really ???"
When compile and program button pressed I quess that .hex file that ready
to work in PIC produced.AM I Wrong?
Yes, PBP will take care of making the HEX file.
Then all you have to do is figure out a way to squirt the hex into the PIC.
Then I load .hex in PIC Simulator and it works.
You can try too.Some fitures as LCD doesnt works but all instructions you can see step by step.Very useful.
How to program PIC I know need only time maybe tomorrow because do it after my job.
Regards