Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
HI. can any1 help me in programming in PIC16F877..
i need a program to turn on and off the led and thats it.
its a simple program but i really need it..
Hi!
You want to blink an led using 16F877 but u haven't specified wheather the code should be in assembly or C language.
visit the site www.piclist.com
and you will find a lot of useful projects from begineer to advance level.
if you still face problems then feel free to ask.
Regards.
initialise
set
interrupt to set reset
or reset to start
or or end
or loopback to start
a basic mcu program struct
think is structures
advice is to read the sources others make while refering to the instruction sets
namings in ansi c
the sets for mcu
have simple risc
restrictred instruction set compilation {or naming and small number of fast maths functions }
so they have a few instructions to use
{mostly maths within registers
{each 8 bit port normaly is concidered a register or infact any port 'width' in bits is also a register}}
so maths can move registers address or if you apply a risc instruction your apply a maths equassion to this or several registers
to gain an outcome that also can be stored or moved into a register
for now or later
depending on forsight of the program maker
or with heighsight
mostly register maths is binary driven
from the few instructions an mcu like a pic has at its disposal to utilize
but very often complex instuctions as applied
or more often simplified to a subset of the solution that is in essance the same outcome {algurithms are comprised of subset maths with heinsight}
and risc micros are complex when made to be
for flash an led
you need
to just initialise the chip
and turn on and off a single pin in a given time frame
to do this just set and reset the pin
try to make next a simple strobed clock that clocks 8 leds on say B port
and use the strobe as enable
use a bus 8bits{register} to set the pins states at the times you want
setting first a RTCC the mcu's realtime clock counter interrupt vecter
to set and reset the strobe
hence setting a flash clock
i recomend c code for you
c code is the best base to learn
as it covers every mcu
crosscompile
so learing this language is best
as you arent bound by different versions
and wording {in written stuff} of assembler nemonics
so asm is bad to learn as every mcu has its own asm
but c is global
so learn this
and really youll wonder in a day of reading and tweaking why you posted this request !
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.