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.

PIC16F88 questions

Status
Not open for further replies.

HarveyH42

Banned
Okay, I've been researching a little, and think the 16F88 would be a good first microcontroller. I have absolutely no experience with these devices, so please excuse my ignorance. There were several factors that influenced my choice, being cost, support components, simplistic instruction set (only 36 opcodes?), PWM, ADC, built in clock. Just seems to most versitile and easiest to learn on.

Anyway, downloaded the data sheet (226 pages), but only thumbed through it so far.

Now, first question, can you W/R external memory devices directly with a PIC? I'm sure that it will be a while before reach the internal limits, but can see running out easy doing sounds samples or large data tables.

I learned assembler on the 6502, so figure I'm good enough to get started. Yeah, I know that I'll need to learn the ports, registers, memory usage, and so on. Been a while, but like riding a bike.

Programmers... I want to go USB (got ports on the front of my PC). I've looked at several schematics, but not seeing anything I liked yet. Basically, looking for a real basic stuff a PIC in to the socket, shove it into the USB, write the program. Kits weren't looking too good, little pricey. Why some require firmware, others don't, I have no idea yet. Also seem to require specific programs, so I'd be stuck using software I may not like. Need to do more resarch on this.

Basically wondering if a 16F88 is a good choice for a beginner, and a few suggestion on a assembler/simulator/burner software package, and maybe a reasonable USB programmer.
 
Umm...you might want to get used to some disappointment. In the Harvard architecture of the PIC neither code space, nor data space is directly accessible outside the chip. External memory expansion is not possible.

Consensus on the board is that the PIC16F628A is a better cheaper chip to start with. The lack of required external components like a crystal or a reset circuit are big pluses.

The PICKit1 at $35 gives you a programmer, development board and a C-compiler in a tight little package. What you actually need depends a great deal on what you want to do.

As for doing USB in your designs, you might want to try and crawl or walk before running a marathon.
 
there are plenty of cheap programmers out the that will program an F88. sparkfun.com has a decent range of them.

I think you picked a good PIC because a) good specs (ADC, 4K flash, 8Mhz intosc) and b) the flash is self programmable so you can use a boot loader. Boot loading is very convenient. It's more expensive than the 628A by about a dollar.

You can get EEPROMs to store extra data but it's not fast to use/manipulate the data.

There are lots of free/trial C compilers out there so you aren't stuck with assembler. Frankly, some aspects of the PIC architecture make asm programming pretty annoying. Since you know asm already, I think you will be ok, though.
 
I was about to give my two cents but I read the responses and all I can say is it's good advice so far.
 
Papabravo said:
Consensus on the board is that the PIC16F628A is a better cheaper chip to start with. The lack of required external components like a crystal or a reset circuit are big pluses.

I think you may be confusing the 16F88 with the 84. The 88 is, in my opinion, superior to the 628. The 88 has everything the 628 has +4K writable Flash, a SSP and ADC. Very good value for money.

Mike.
Edit, corrected error.
 
Last edited:
Thanks, felt good about my choice in the 16F88. Think I'll stick with assembler though. With 'C', I think each compiler will be a little bit different, and I'd hate to waste a lot of time and money on software that I might not want use. Compilers tend to waste a lot of resources. Sure, 4k is a lot for most applications.

Will check into the programmer suggestions, hopeful get started in a week or so.
thanks
 
It's funny, I started out with PICs much as you. I've written a lot of assembly language (and a lot of C) and went with that but the PIC's architecture is a mess - memory banks, pages, fiddling with status bits to access different registers, skip conditionals and a wierd indirection scheme. I've found several C compilers to be pretty effective and haven't yet run out of space. You can find plenty of free versions that will do a lot.

By the way, the 18F series makes up for some of those deficiencies.

A much cleaner architecture is the AVR line, by the way. There's a very nice free C compiler for it based on GCC.
 
philba said:
IA much cleaner architecture is the AVR line, by the way. There's a very nice free C compiler for it based on GCC.

Agree, though I have never ventured onto AVR land yet.

From what I have read so far, most instructions are single clock cycle(4 in case of PIC) and it has 32 general purpose registers which allow logical/arithmatic operations between them and several registers can also acts as 16-bit address pointer to access the program memory. Some AVR have realtime clock too.

This make the AVR line very powerful indeed dollar for dollar wrt PICs.
 
Yes, its a wonderful architecture. but pics are easier to drop into a circuit and get working. plus PICs are amazingly immune to abuse and screwups.
 
philba said:
Yes, its a wonderful architecture. but pics are easier to drop into a circuit and get working. plus PICs are amazingly immune to abuse and screwups.

Funny you have mentioned it. A guy in Microchip forum asked if his PIC is damaged as he had "only applied 12V to it for a few seconds" and now he cannot read the chip ID anymore.

Then some 30 minutes later he posted again saying he had found the answer by doing experiment and confirmed that another two 18F PICs actually blew up after he applied 12V to them for a few seconds. He then remarked he once worked a 16F84 directly off a 9V battery for a "decent amount of time".

Looks here for the full story:

**broken link removed**
 
I think is was the price of the AVR chips that made me shy away from taking a closer look.
Yeah, I've been looking through the PIC data sheet and instruction set, and the branch and conditionals are kind of thin. I still have a lot to read, but I expected to have fewer options. I know its tough at first, but routines are re-usable, and your library grows as you go along.
 
HarveyH42 said:
I think is was the price of the AVR chips that made me shy away from taking a closer look.
Yeah, I've been looking through the PIC data sheet and instruction set, and the branch and conditionals are kind of thin. I still have a lot to read, but I expected to have fewer options. I know its tough at first, but routines are re-usable, and your library grows as you go along.

The PIC is a RISC chip, so it doesn't have many instructions (which makes it easier to learn), but it does have the advantage of being massively popular, so there's a huge amount of code and help available.
 
well, the PIC does have a reduced instruction set but it parts ways with the RISC philosophy of putting all the silicon into execution speed, wide registers, multipliers and large address space. I kind of think 8-bit RISC is a bit of an oxymoron.

The PICs are typically a few bucks cheaper than AVRs.

12V to a PIC?? that's pretty stupid. I bet at least Mclr didn't blow. lol I think the proof of stupidity is the subsequent blown PICs. well, at least he didn't apply 240 VAC. I just screw up by reversing Vss and Vcc.
 
dealing with the 16F series .. i liked it.good support/free codes etc .but. i don't like the absence of MUL and DIV instructions. in the atmel side the 89S series are cheaper than the similar fn: PICs , with more ram/rom/io and cisc instructions
 
Status
Not open for further replies.

Latest threads

Back
Top