Searching \ for 'PIC18F tutorials?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=18F
Search entire site for: 'PIC18F tutorials?'.

Truncated match.
PICList Thread
'PIC18F tutorials?'
2007\02\25@075630 by lee

flavicon
face
Hi, I'm new to world of PICs, I've had some PIC18F2620s and a PIC-PG2C
programmer for maybe 6months now, and I seriously need to get SOMETHING
happening.  But try as I may, all of the basic tutorials I find only cover
16F's, and I just don't know how they differ to change the circuit and
code to suit an 18F...

So in a nutshell... If someone would be kind enough to point me to a bare
basics tutorial (ie., flashing LED), which includes both the physical
circuit and code (assembly or C) that will work with a 28pin 2620, I would
REALLY appreciate it... Once I know for certain how that what I physically
have setup and what I have coded should definitely work, then I can start
making some progress, but it's the uncertainty that's been stopping me
from starting for the past 6months (obviously, this is very much a side
hobby).

Once I get a basic circuit actually working, then I should be pretty right
for a while.  But I'm reaching the end of my tether, staying up 'til 2 in
the morning searching the web for the elusive tutorial that will get me
started!  HELP!!

Thanks heaps in advance
Lee

2007\02\25@085138 by Rikard Bosnjakovic

picon face
On 2/25/07, spam_OUTleeTakeThisOuTspambaudalign.com <.....leeKILLspamspam@spam@baudalign.com> wrote:

> So in a nutshell... If someone would be kind enough to point me to a bare
> basics tutorial (ie., flashing LED), which includes both the physical
> circuit and code (assembly or C) that will work with a 28pin 2620, I would
> REALLY appreciate it...

Have a look at http://www.mstracey.btinternet.co.uk/pictutorial/picmain.htm

It says it's for the PIC16F84, but it also says "Once you have learnt
how to program one type of PIC, learning the rest is easy".  I cannot
comment on this, since I'm still waiting for my PIC-programmer to
arrive, so I can start off.

--
- Rikard.

2007\02\25@090447 by Richard - Main

picon face

----- Original Message -----
From: <leespamKILLspambaudalign.com>
To: <.....piclistKILLspamspam.....mit.edu>
Sent: Sunday, February 25, 2007 7:57 AM
Subject: PIC18F tutorials?


{Quote hidden}

> --

2007\02\26@143532 by peter green

flavicon
face

> So in a nutshell... If someone would be kind enough to point me to a bare
> basics tutorial (ie., flashing LED), which includes both the physical
> circuit and code (assembly or C) that will work with a 28pin 2620, I would
> REALLY appreciate it... Once I know for certain how that what I physically
> have setup and what I have coded should definitely work, then I can start
> making some progress, but it's the uncertainty that's been stopping me
> from starting for the past 6months (obviously, this is very much a side
> hobby).
there is a book called embedded design with the pic18f452" (see http://www.picbook.com/ ) which i've heared is a pretty good starting point (i myself learnt from a lecture course at uni).

quick and dirty tutorial (untested)

install mplab IDE
install mplab C18 student edition
go into project set language tool locations and set up the include search path for the mplab C18 toolchain to the h subfolder of the C18 installation directory
start a new project using the mplab C18 toolchain
set your target device
add the linker script to your project
create a new file, save it in your project directory with a .c extention and add it to your project and add it to your project
set up the configuration bits, select internal oscilator
enter some code

#include <p18cxxx.h>
#include <delays.h>
void main () {
 TRISB = 0xc0;
 LATB = 0;
 while (1) {
   int i;
   for (i=0;i<10;i++) {
     Delay10KTCYx(100);
   }
   LATB++;
 }
}

go into configure-configuration bits, set the oscilator to intosc, the PORTB lines to digital, MCLR enabled everything else disabled.

build the project

export a hex file, you must use an exported hex file rather than the one from the compiler or it won't contain configuration bits

pass the exported hex file to your programmers software and program the chip

connect a regulated supply to the pic placing a 100nf capacitor accross the supply
add a resistor pulling mclr high
put some leds on the lower 6 bits of port B with 1k series resistors (or use LEDs with built in series resistors if you are lazy)
enjoy your counting demo



More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...