I've eventually got round to buying some microcontrollers!

Status
Not open for further replies.

Hero999

Banned
I've bought the following:
PIC12F509-I/P a cheepy 8 pin DIP for my bathroom fan project.
PIC16F505-I/P - by all accounts the 14 pin DIP version of the 509.
PIC16F687-I/P - a nice MCU in a 20 pin DIP , not cheap but it has some handy features - comparators and ADCs.
PIC16F54-I/P - the cheapest microcontroller in the RS catalogue. I know it doesn't have any features and it requires an additional resistor and capacitor but it's so cheap and must be handy for some things.

I've got five each of the above. Notice, for the most part, how I've got cheap MCUs with next to no features? From reading this forum, I've noticed that for most applications expensive MCUs aren't needed.

I know I've probably asked this before but I need some development software, preferably for Linux.

For my first project I'm going to build a time for my bathroom fan. The idea is you pull the cord switch once and it'll turn on for 15 miniutes, pull it twice and it'll stay on permanently but if you pull the cord when the fan's running it'll turn off. I plan to use the PIC12F509-I/P for this as it doesn't require a complex MCU and will test it on a bread board with a push button switch and an LED.

I've had the idea of building this from logic ICs for years but I've decided to scrap it in favour of an MCU which if only one IC instead of two.
 
Modern Stuff

Try some modern ones.

16F88
16F877A
18F1320
18F4620

And a Junebug for a programmer/experiment board.



Build some of Nigel's stripe boards. The 40 pin one will work with the 4620.

All of these except the 877A have a built in oscillator.

And the 18 pin one will work with the 1320.
Add an ICSP connection to each and go crazy
 
PIC16F88 and PIC16F88x are full of features
IMO, it's good to start with the microcontroller that is less complicated. When I just got started of learning PICs, I didn't know that I have to disable the comparator as well as the ADC. After that, these steps are in my mind forever
 
One problem with your selection is the lack of in circuit debugging capability. Whilst the newer chips have got a lot more peripherals, you don't have to use them and you can simply ignore them. Another problem is that all your chips except the 689 are 12 bit processors and have a more limiting instruction set and a very small (2 words) stack. Whilst simple is good, too simple can make writing code more difficult. The 16F689 is a good choice and I suggest you start with this chip and once you have something working, try to shoe horn it into one of the others. The 689 also has the advantage of an internal oscillator and so can work with no external components.

May I suggest that you get a 16F88 so that you can step through your code with the debugger. I'd also recommend Bill's Junebug.

Have fun.

Mike.
 
Hero999 said:
I know I've probably asked this before but I need some development software, preferably for Linux.
GPUTILS is a collection of tools for the PIC microcontrollers: http://gputils.sourceforge.net/
I occasionally tried them, as I'm not a Linux user. The PIC12F509 you're planning to you use for your project is supported. Although this PIC has limited features, I think that it's suitable for simple applications like timers, dimmers, etc. It has the internal oscillator.


As the circuit should be very simple, it would be interesting to design it with a transformerless power supply and a triac.
 
I'd also suggest NOT buying from RS! Their prices are hugely inflated. I know you may have few choices depending on where you live, but I've used Microchip Direct with great success and www.futurlec.com as well.

When dealing with Microchip Direct many PICs are mere cents apart in pricing... so while I'm not doing consumer-level production (1000s of devices) I see no point in using a smaller less flexible PIC than the 18F2455 or 2550. Unless it's just for the challenge of trying to fit everything into the smallest box of course

P.
 
blueroomelectronics said:
For some reason I thought you already had a programmer. Here's a link to some Linux tools for the PICkit2 or my Junebug kit.
http://piklab.sourceforge.net/
I do have a programmer, I built the one on Nigel's site.

aussiepoof said:
I'd also suggest NOT buying from RS! Their prices are hugely inflated. I know you may have few choices depending on where you live, but I've used Microchip Direct with great success and www.futurlec.com as well.
I bought all my PICs from RS, the main reason is because they're convenient, they can get the goods to me the the next day and don't charge me for delivery, even for small orders. I can't think of any other supplier that will do this.

Not in my experiance with RS anyway, the 16F54 cost 55p and the 16F687 cost me £1.30, excluding VAT.

All the other PICs mentioned here (with the perhaps the exception of the 16F689) cost at least twice as much as the 16F687 and it doesn't seem worth it for the simple projects I plan to build. The PIC16F689-I/P does seem a good choice though.

Another thing is, I haven't tested my programmer yet and I don't want to fry an expensive PIC if I've make a mistake constructing it.

Edit:
What's the difference between the 16F689 and the 16F687?

I've looked at the datasheet (see attached) but I don't understand it, could someone please translate it into English please?
 

Attachments

  • 16F687 datasheet - P1.png
    59.9 KB · Views: 141
Last edited:
The program memory of 689 is twice of 687, i.e. more program/longer program code can be stored in 689. The RAM is also twice that can be used for more data.
 
They are the features built-in in the microcontroller. Check the datasheet in detail.
SSP - SPI and I2C for interfacing with external peripherals
ECCP - Consists of 3 module, PWM is one of them
EUSART - UART or USART for communication
 
[SIZE=-1]SSP: Synchronous Serial Port
ECPP: Enhanced Capture/Compare/PWM module
EUSART: Enhanced Usart module (RS232)

EDIT: bananasiong, we were posting at the same time
[/SIZE]
 
Last edited:
Another Tutorial

The Pic Elmer series is also a good start for assembler. It is built around the 16F84.
https://www.amqrp.org/elmer160/

Ok, what is an "elmer". Some of us are ham radio operators. An "elmer" is someone who helps you learn about the subject. In this case amateur radio.

So many of you are "elmer"s for PIC, and some of you need the help of an "elmer".

The pic-el board that is available is generally what is used with the pic elmer series. There are some good and some bad things about it. The good is it is an "all-in-one" board. programmer/experimenter. The bad is that the programmer is "serial" (well sort of). It has to have a "real" serial port as the programmer is the JDM or something like it variety.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…