Searching \ for '[PIC] - Very Newbie - What Do I Do Now?' 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/begin.htm?key=pic
Search entire site for: '- Very Newbie - What Do I Do Now?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] - Very Newbie - What Do I Do Now?'
2005\10\07@151725 by Ed Edmondson

flavicon
face
I truly am new to microcontrollers. I went to an auction and bought the following items for $25.00.

Picstart Plus Programmer, An ICD-2 in circuit debugger, An orginal ICD with a TransData demo board, A PICDEM 2 plus, misc. 877 demo boards, 25 f876, 877 devices and a CSS PCW C compiler.

The question is where do I begin? I started trying to read some of the Microchip documentation. I tried to build the TUT877.asm found in the original MPLAB ICD book (DS51184B). I finally got the file to assemble, with Bank 0 warnings, but even without errors I received a "Failed To Build" error. Yes, I installed MPLAB IDE version 7.21. The TransData demo board outlined in the DS51184B manual has a short on the board (I guess) because the RC7 LED remains lit even with no processor.

After a week all I seem to have acomplished is used up a lot of time and have only a headache to show for it. Someone at Microchip recommended this list as a possible learning aid.

2005\10\07@154103 by Josh Koffman

face picon face
Woah you got quite the deal (assuming it all works). One of the best
resources on the net is this list and the corresponding website -
http://www.piclist.com. There you will find tips, tutorials, and
projects. You will also find links to tons of other pages that will
help you get started. Don't get discouraged!

Josh
--
A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.
       -Douglas Adams

On 10/7/05, Ed Edmondson <spam_OUTdredwinphdTakeThisOuTspambresnan.net> wrote:
> I truly am new to microcontrollers. I went to an auction and bought the following items for $25.00.
>
> Picstart Plus Programmer, An ICD-2 in circuit debugger, An orginal ICD with a TransData demo board, A PICDEM 2 plus, misc. 877 demo boards, 25 f876, 877 devices and a CSS PCW C compiler.
>
> The question is where do I begin? I started trying to read some of the Microchip documentation. I tried to build the TUT877.asm found in the original MPLAB ICD book (DS51184B). I finally got the file to assemble, with Bank 0 warnings, but even without errors I received a "Failed To Build" error. Yes, I installed MPLAB IDE version 7.21. The TransData demo board outlined in the DS51184B manual has a short on the board (I guess) because the RC7 LED remains lit even with no processor.
>
> After a week all I seem to have acomplished is used up a lot of time and have only a headache to show for it. Someone at Microchip recommended this list as a possible learning aid.

2005\10\07@155417 by olin piclist

face picon face
Ed Edmondson wrote:
> I went to an auction and bought
> the following items for $25.00.
>
> Picstart Plus Programmer, An ICD-2 in circuit debugger, An orginal
> ICD with a TransData demo board, A PICDEM 2 plus, misc. 877 demo
> boards, 25 f876, 877 devices and a CSS PCW C compiler.

Wow, that's a heck of a deal for $25.

> The question is where do I begin?

With the documentation.  First read the 16F87x data sheet.  Those PICs are a
little old now, but quite capable and perfectly fine to learn on.  The
16F877/876 Were the top of the line a few years ago.  The data sheet will
tell you all about what the chip does.  It's a nicely self contained book
that has everything in it from the architecture, to the peripherals, to the
instruction set.

Next read the MAPASM/MPLIB/MPLINK manual.  That tells you how the
programming tools work.  Once you've done that, download MPLAB and have a go
at it.  Start with a simple program to blink and LED and expand from there.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\10\07@160941 by Richard J. Pytelewski

picon face


Ed:

Turn your PICStart programmer over.... what revision is it.. Lots of pre rev
4 ones floating around.  It is the last digits in your serial number.  -R
something.....  Does it have the current PUM inside?  the current firmware?

Rich P

{Original Message removed}

2005\10\07@165833 by Jinx

face picon face
> Someone at Microchip recommended this list as a possible
> learning aid

"recommended" - thumbs up. "possible" ? Ouch

Ed, got any projects in mind ? I've tried to teach a couple of
young relatives about micros and at first they were completely
unaware of what exactly PICs are capable of. I'm assuming
you at least have an inkling, and good on you for persisting
even though you only got a headache for your efforts

Was there any reason given for the "Failed to build" message ?

2005\10\07@183124 by Ed Edmondson

flavicon
face

> Turn your PICStart programmer over.... what revision is it.. Lots of pre
> rev
> 4 ones floating around.  It is the last digits in your serial number.  -R
> something.....  Does it have the current PUM inside?  the current
> firmware?
>
> Rich P
>

The PICSTART has an PUM inside and I was able to figure out how to download
the latest HEX file to the unit. Can anyone recommend an .asm file for
flashing LED's with an F877?  This part may be a lot more complicated but
they are the only chips I have at the moment.

I have a 1998 bound data sheet for the F873, F874, F876, and F877. The
document number isDS30292A. I also have a 1997 "Mid-Range MCU Family
Reference Manual" document number DS33023A.

What I can't find are the Instruction Set commands for programming this PIC
in assembler. Where can I obtain this information? It seems it would be
really hard to program the PIC without this information.

2005\10\07@183936 by Richard J. Pytelewski

picon face
part 1 1423 bytes content-type:text/plain; (decoded 7bit)

Hope this helps .....
microcontroller : P16F877A

program Led_blinking

Configures pins of PORTB as output
Turn ON LED's on PORTB
Toggle LED's ON and OFF

Hope this helps

Rich P




{Original Message removed}

2005\10\07@184841 by Marcel van Lieshout

flavicon
face
or this on Wouter's site: http://www.voti.nl/blink/index.html


Richard J. Pytelewski wrote:
{Quote hidden}

>> {Original Message removed}

2005\10\07@200342 by Aaron

picon face
Ed Edmondson wrote:

> The PICSTART has an PUM inside and I was able to figure out how to
> download the latest HEX file to the unit. Can anyone recommend an .asm
> file for flashing LED's with an F877?  This part may be a lot more
> complicated but they are the only chips I have at the moment.


http://www.voti.nl/blink/n_index.html

Wouter also has lots of other good starter info on his site.  And he
frequents this list.

Aaron

2005\10\07@200610 by Kevin

flavicon
face
> Ed Edmondson wrote:
> > I went to an auction and bought
> > the following items for $25.00.
> >
> > Picstart Plus Programmer, An ICD-2 in circuit debugger, An orginal
> > ICD with a TransData demo board, A PICDEM 2 plus, misc. 877 demo
> > boards, 25 f876, 877 devices and a CSS PCW C compiler.

Well, it looks like you got a PCW C compiler, so you can
check out the CCS website. http://www.ccsinfo.com
If you install the C compiler on your windows computer, it
will come with a lot of example programs in C. These should
compile correctly for quick examples.

2005\10\07@202353 by Jinx

face picon face
part 1 741 bytes content-type:text/plain; (decoded 7bit)

> I have a 1998 bound data sheet for the F873, F874, F876, and
> F877. The document number isDS30292A. I also have a 1997
> "Mid-Range MCU Family Reference Manual" document number
> DS33023A
>
> What I can't find are the Instruction Set commands for programming
> this PIC

I use both of those datasheets. The instruction set starts on p138 of
DS30292A. It won't tell you how to write a program as such. You
need to look at example programs for that. Have you ever done any
programming at all, micro or otherwise ?

Attached has all the ingredients you need to flash a LED. Some will
have their own opinions about how it's done (eg absolute mode) but
it'll get you going




part 2 2381 bytes content-type:application/octet-stream; (decode)

part 3 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

2005\10\07@203127 by Jinx

face picon face
BTW, the asm I posted was clipped from another project.
Ignore the reference to INTEDG and also set trise to o/p

2005\10\08@024536 by Bill & Pookie

picon face
The instruction set should be in the particular manual for that chip.  They
are on the MicroChip site.

Bill

> What I can't find are the Instruction Set commands for programming this
PIC
> in assembler. Where can I obtain this information? It seems it would be
> really hard to program the PIC without this information.

2005\10\08@025546 by Jinx

face picon face
Ed, you may have spotted the mistake - I was testing
the delay routine and set org 0x000 to goto delay. It
should be, of course, goto init

D'oh ! Sorry if you wasted any time with that

2005\10\08@043516 by Wouter van Ooijen

face picon face
> The PICSTART has an PUM inside

The deal you got is looking better and better!

> Can anyone recommend an .asm
> file for
> flashing LED's with an F877?

not .asm, but Jal and .hex on http://www.voti.nl.blink

> What I can't find are the Instruction Set commands for
> programming this PIC
> in assembler. Where can I obtain this information?

MPLAB/MPASM help

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\10\08@115044 by Ed Edmondson

flavicon
face

----- Original Message -----
From: "Jinx" <.....joecolquittKILLspamspam@spam@clear.net.nz>
To: "Microcontroller discussion list - Public." <piclistspamKILLspammit.edu>
Sent: Friday, October 07, 2005 6:16 PM
Subject: Re: [PIC] - Very Newbie - What Do I Do Now?



>> What I can't find are the Instruction Set commands for programming
>> this PIC
>
> I use both of those datasheets. The instruction set starts on p138 of
> DS30292A. It won't tell you how to write a program as such.

> You need to look at example programs for that.

It appears my next step is to search the net for 877 (or any other) code
examples and try to figure out what the code is doing.

> Have you ever done any  programming at all, micro or otherwise ?

No. Not one single line of code. I have a C compiler and don't know C. Just
that it appears to be the perferred programming language. I also heard C is
very dificult to learn and master.

Thanks to everyone who took the time to provide some insight on what I need
to do.


2005\10\08@125451 by olin piclist

face picon face
Ed Edmondson wrote:
> I have a 1998 bound data sheet for the F873, F874, F876, and F877. The
> document number isDS30292A.

There may be a newer version.  Check the web site.

> What I can't find are the Instruction Set commands for programming
> this PIC in assembler.

You do have to actually *read* the manual.  I know this can be a little
tricky to find, but after much searching it's been discovered in the chapter
called "Instruction Set Summary" in the data sheet.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\10\08@171425 by Jinx

face picon face
> It appears my next step is to search the net for 877 (or any other)
> code examples and try to figure out what the code is doing

The 16F877 is a fairly average PIC. Most code should work
on it. For example, there's a huge body of 16C84/F84 and 12C508/
509 code out there which would run on an 877 with only a little
modification (eg RAM start address). A lot of code for more recent
12F/16F PICs will work too. Note that micros (particularly newer
ones) have many and different peripheral features, which you'll have
to account for when adapting code. But something like a basic 16F
maths routine or I/O will work on virtually any PIC

You should have a look around http://www.piclist.com, particularly
the Source Code section

> > Have you ever done any  programming at all, micro or otherwise ?
>
> No. Not one single line of code. I have a C compiler and don't
> know C. Just that it appears to be the perferred programming
> language

<trying hard to dodge the annual "C or asm ?" bullet>

Weellll, IMVHO, it would be far better to learn at least some asm
at this stage so you can understand how the PIC works and does
things fundamentally. Simple and commented code examples will
help enormously. Only after you have at least a reasonable grasp
of asm should you consider a higher level language. IMVHO

Even people who use C need to tinker at the asm level to optimise
performance. Time-critical code for example

> I also heard C is very dificult to learn and master

Wouldn't know, but most people seem to cope OK

> Thanks to everyone who took the time to provide some insight
> on what I need to do

Come back any time with questions

2005\10\08@205959 by Kevin

flavicon
face
{Quote hidden}

Learning ASM first is probably a good idea. I found C to be
a relatively easy language to learn and use, but Mastery is
another story.
Checkout the links below if you want a C intro for the F877
www.phanderson.com/PIC/PICC/pic_c_routines.html
http://www.phanderson.com/icd/tutorial.html
http://www.phanderson.com/icd/PIC16F87X_tutorial_sample.pdf

~Kevin

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