Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

its finally here! (I just need to tell somebody)

Status
Not open for further replies.

Steve P

New Member
Hey guys. FYI, my 16F877A came today along with the 3220 pin breadboard I ordered...I'm ready to get busy! I've been reading "Digital Electronics Guidebook" by Myke Predko and now that I have my breadboard, I can finally finish chapter 3! He's got some projects in here to explain basic circuit design to get a beginner comfortable with the different current laws and IC fundamentals.

WISH ME LUCK!

ps. don't feel a need to reply to this. I'm just excited about getting my new toys in the mail and no one but you guys would understand the joy I feel.

PEACE!
 
I went to order a PIC16F877A earlier this week and I was told the part was discontinued. I thought to myself... Eh?!?! I didn't know they'd superseded it?

I asked the girl on the phone if it had been superseded to a new part and she said she didn't know as she wasn't technical. I haven't bothered to look into it yet but my guess is she made a cock up.

Brian
 
Congrats' Steve... Let me know if you're missing any little parts that will keep you from 'playing' during the Holiday weekend... Do you have a programmer?

Have fun... Regards, Mike
 
You remember me of my first LED started blinking :lol:

It was great for me 8)
 
Thanks Mike for the offer. This is the programmer I ordered off Ebay:
**broken link removed**
What do you think? I saw a forum post on it from earlier this year, but they've made considerable software updates since then as it can program a number of different PICs.

I received the programmer lastweek, so I'm going to start programming some very simple circuits over the next couple weeks until I get the hang of it. I'm thinking that the 16F877A might have been TOO MUCH chip for what I'm planning, but I figured it would be better to have more than not enough. We'll see.

Does anyone know of a good tutorial that would explain circuit schematics? I can't ever make sence of them.
 
That programmer looks ok... I built a serial ICD2 clone from the Lothar Stolz design at stolz.de.be for about $15 in parts but it's not USB...

The '877A isn't "too much"... It'll give you plenty of I/O and supports I2C 'master' mode for that DS1307 Real Time Clock sample or those 24LC512 serial I2C eeprom samples... Use a MAX232A or similar interface for RS-232 operations and program the '877A with a bootloader you'll be able to load your programs without the programmer using RS-232...

Have fun... Regards, Mike
 
Use a MAX232A or similar interface for RS-232 operations and program the '877A with a bootloader you'll be able to load your programs without the programmer using RS-232...



What exactly is a BootLoader ?? and how does it do the job of a Programmer ??
 
Electrix said:
Use a MAX232A or similar interface for RS-232 operations and program the '877A with a bootloader you'll be able to load your programs without the programmer using RS-232...



What exactly is a BootLoader ?? and how does it do the job of a Programmer ??

Certain PIC's have the ability to write to their own program memory (the 877 is one), a bootloader is a program that is installed in high memory (by a conventional programmer) and can then program itself via an RS232 link.
 
Hi Steve,

There are a bunch of different bootloaders available... My home-brew bootloader occupies the first 256 words of program memory and I write my assembler programs to 'org' at 0100h with interrupt vector at 0104h...

When I remove the 'run' jumper and press reset on my '877A board, I see the bootloader prompt on Hyperterminal... Then I use the Hyperterminal <send text file> menu option to send my hex file... After programming I replace the 'run' jumper and press reset again to run the program... So it's a relatively simple process -- remove jumper, press reset, download program, replace jumper, press reset...

Some bootloaders use a PC side program to download the PIC program and often use different 'trigger' mechanisms... My 'trigger' might seem like it's tying up a PIC pin but the pin I use is connected to a miniature speaker and I'm taking advantage of the pin reading low through the speaker when the jumper is in place and reading high when the jumper is removed...

I enjoy 'playing' with my projects at work during my lunch break using nothing more than my work PC with MPLab installed, my '877A project board, a serial cable, and power brick... Cool...

Regards, Mike
 
quick question...

I keep hearing everyone say "words" when refering to the program memory. I downloaded and installed MPLAB and it has a map that graphically shows memory allocations. How does that map correlate to these program "words"?


thanks for all the input guys.
 
Steve P said:
quick question...

I keep hearing everyone say "words" when refering to the program memory. I downloaded and installed MPLAB and it has a map that graphically shows memory allocations. How does that map correlate to these program "words"?

A "word" is a single program memory location, different PIC's have different length words, the 16F series are 14 bit, the 12C series are 12 bit, and the 18F series are 16 bit. A standard "word" in PC terms is 16 bits, which is two 8 bit bytes.
 
A program, or the hex file, is simply a list of instructions. Each instruction takes up a word, which in the case of PICs, is 14 bits I think.

In PC programming, a word usually means 16 bits, with double word (DWORD) occupying 32 bits.
 
My home-brew bootloader occupies the first 256 words of program memory and I write my assembler programs to 'org' at 0100h with interrupt vector at 0104h...

When I remove the 'run' jumper and press reset on my '877A board, I see the bootloader prompt on Hyperterminal... Then I use the Hyperterminal <send text file> menu option to send my hex file... After programming I replace the 'run' jumper and press reset again to run the program... So it's a relatively simple process -- remove jumper, press reset, download program, replace jumper, press reset...

Hi Mike,
Thanks for your explaination...Now I get the importance of the bootloader..It will surely help me do away with the bulky programmer I made..Mike, can u post the bootloader program for the '877 you talked about..also can post the schematic of the project board with the jumper connections..
Thanks :D
 
Gosh, I'm not sure I want to post my '877A bootloader code... It's pretty crude and I'm very sensitive to criticism (grin)...

Let me see if I can dig it up (and clean it up)... Meanwhile, here's the Load/Run switch circuit...

Regards, Mike
 

Attachments

  • load-run_switch.jpg
    load-run_switch.jpg
    12 KB · Views: 1,153
Have a look at www.microchipc.com which have some excellent bootloaders you can download, and you don't lose an I/O pin with them either!.

There are plenty of bootloaders you can download free, the ones on the site above, like most, reside in high memory, and the programs live in their normal low memory space.
 
Mike said:
Gosh, I'm not sure I want to post my '877A bootloader code... It's pretty crude and I'm very sensitive to criticism (grin)...

First one coming, just kidding. :D

Nearly all bootloaders elect to place itself into the high memory space leaving the lower memory space for incoming program. Why would you choose to place yours in the lower memory space?
 
I prefer to have bootloader in Higher memory space (at the end of program memory), so that my programs won't be affected (I will just place GOTO Start instruction @ 0x0004 instead of 0x0000). Therefore I won't have to solve Interrupt re-alocation problem.
 
Why would you choose to place yours in the lower memory space?
That's how it was done on an early Microchip application note I used as the basis for my various bootloaders, as well as on their AN851 bootloader... If it's good enough for Microchip, it's good enough for me (grin)... There's also boot block protection on many PIC devices just for that purpose (and it ain't in high memory)...

I don't have any problem ORG'ing my programs at 100h (16F') or 200h (18F') but I'm only programming in Assembler...

Yeah, I've heard the complaint before about dedicating a pin for the 'trigger' but it's a pin I'm already using for something else so I'm not really giving up a pin... You could also use an existing push button for the 'trigger' by having the bootloader test it at power up or reset... No push button at reset or power up = normal run mode... Push button at reset or power up = bootloader...

I have written bootloaders for 16F87/88, 16F876A, 16F877A, and many different 18F' devices... My 18F2620/4620 bootloader fully supports the 64 byte write/erase buffer size for that device and still fits within 100h words of memory...

Regards, Mike
 
Thanks Mike.

I need to look up bootblock protection as you reminded me of its importance. I think people like bootloader in the high memory space because one do not have to prepare a special object HEX file just for bootloader and can use the same HEX file for both bootloader and conventional programmer.
 
Status
Not open for further replies.

Latest threads

Back
Top