Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 30th September 2007, 04:59 PM   (permalink)
Default Which Microcontroller to choose

Hi all, I would like to know which microntroller to buy...
I have a PIC16F84A but its expensive, doesnt have PWM, doesnt have ADC, old, etc...

Also i have a problem with my PIC16F84A, whenever i try to use input(..) (CCS) my output LED flashes randomly, i can activate it with my finger etc...

ATMEL or PIC?

Well, i bought this PIC because I found a cheap homemade programmer...

So, my "needs" are, easy interface, PWM, ADC, homemade programmer, possibility of use C code instead of ASM, many samples on the net etc, before I bought PIC16F84A i searched google for it and i found 300k results, I tried with other ones and only found around 80k...



Thank you all



EDIT:

Ok, i read the "Newcomers, please read! (PIC regarded) Upd. 0xD" and i see that a good choice is 16F88, but i cant find an homemade programmer :/
Also that article is from 2005, I bet theres something better outt here

By the way, with my old PIC (16F84A) i use http://pic16f84.hit.bg/ both schematic and PicProg software

Last edited by nunotins14; 30th September 2007 at 05:13 PM.
nunotins14 is offline  
Old 30th September 2007, 05:34 PM   (permalink)
Default

There is no solid answer to the ATMEL or PIC question. Both are good.

There is more support for the PIC here then for other processors.

I use CCS C. Sounds like you have a floating input that is effecting you LED. Would need to see your schematic and code to be sure.

There are basic types of PIC programmers.

Serial. They are the simplest to build buy do not work with all PC's. Not all PC's have serial ports and some that will not work.

Parallel. For the most part if you build them correctly they work.

ICD2 clones. These communicate with the PC over RS232 or USB. The actual programming is done by an on board pic.

ICD2 clones are popular. Microchip provides the software so do not have to depend on a 3rd party to keep the chip support up to date. I can be used as a run control tool (hardware breakpoints) to debug your code in real time. aka debugger. To build one of these from scratch you need to get your hands on a programmed chip. Chicken egg sort of thing.

You can get an Inchworm ICD2 kit from DipMicro, or build one from the schematic found on Bill's site http://www.blueroomelectronics.com/

You can find schematics for serial and parallel programmers at sparkfun.com and elsewhere.
3v0 is online now  
Old 30th September 2007, 07:11 PM   (permalink)
Default

there are a lot of PICs with different numbers of I/O pins that do all of that. microchips website has all of them listed in a chart that shows thier specs for you to compare each. It depends on who many IO you need really. I use the 12f683 for 1 I, 5 I/O and the 16f690 for when I need up to 18. The 16f690 is pretty cheap also.

You found more results for the 84 because it is old. There still seems to be a lot of them left though.

Last edited by Ambient; 30th September 2007 at 07:14 PM.
Ambient is offline  
Old 30th September 2007, 08:29 PM   (permalink)
Default

hmm ok, but what about the other things like PWM ADC etc?
I found a programmer for the 16f88 and i think this one feets all my needs...

my schematic is simple, i have the 4Mhz with two 27pf capacitors and my LED is connected directly to PIN_A1

my code:

Code:
#include "16F84A.h"
#fuses XT, NOWDT, NOPROTECT
#use delay(clock=4000000)

void main()
{
	if (input(PIN_A0) == 1)
		output_high(PIN_A1);

	else if (input(PIN_A0) == 0)
		output_low(PIN_A1);
}
Im testing this near my notebook, sound system etc, im using a 6V supply...

If i connect PIN_A0 to GND it sets PIN_A1 to GND always, and same for VCC, but i cant make it "stable"

Also, im trying to communicate trough infrared, if i make a LED flash (delay_ms()) it works, if i connect a Tx IR i can "capture" the IR beam with a TSOP1736, but this only work with the transformer, if i use batterys which should have 2A the signal is weak...

My main problem with IR is that when i use "output_low()" the LED (output), on TSOP1736 doesnt turn off

Last edited by nunotins14; 30th September 2007 at 08:32 PM.
nunotins14 is offline  
Old 30th September 2007, 08:58 PM   (permalink)
Default

I suggest you check my tutorials, which (among other things) show how to do IR.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 30th September 2007, 09:20 PM   (permalink)
Default

and its in ASM :/, but ill have a look, also its for 16F628 which can have more "stuff" than 16F84A, and i cant see the schematic :/
nunotins14 is offline  
Old 30th September 2007, 09:26 PM   (permalink)
Default

Almost all of the tutorials use nothing the 16F84 hasn't got, and the schematics are all there as well - under Hardware.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 30th September 2007, 09:29 PM   (permalink)
Default

ok, found , your page looks awsome, do you have MSN?
nunotins14 is offline  
Old 30th September 2007, 09:42 PM   (permalink)
Default

Quote:
Originally Posted by nunotins14
ok, found , your page looks awsome, do you have MSN?
NO, I'm not a kid
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 30th September 2007, 09:48 PM   (permalink)
Default

lol, ok, well, i dont understand ASM quite well, can you explain how to "play" with the IR?
I see LCD variables, this means that i need a LCD?

A bit above i see Device Command so i think i really need a LCD, can i make it so i only need a LED to test if its working? probably i can use LED's instead of LCD but since i dont understand ASM....


Also, can you translate it to C? :P
nunotins14 is offline  
Old 30th September 2007, 09:57 PM   (permalink)
Default

Quote:
Originally Posted by nunotins14
lol, ok, well, i dont understand ASM quite well, can you explain how to "play" with the IR?
I see LCD variables, this means that i need a LCD?
Only to duplicate what I did.

Quote:

A bit above i see Device Command so i think i really need a LCD, can i make it so i only need a LED to test if its working? probably i can use LED's instead of LCD but since i dont understand ASM....
The Device Command stuff is simply part of the Sony SIRC's system.

Quote:

Also, can you translate it to C? :P
Nope, I don't do C.

If you check my radio tutorial, there's a link to where the routines came from, he has similar Mancester type IR routines as well.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 30th September 2007, 10:02 PM   (permalink)
Default

hmm, sorry i didnt understand the most of your last post, but ill get it :P tomorrow ill buy the components to test it, thank you for your help


By the way, wheres the radio tutorial?

Last edited by nunotins14; 30th September 2007 at 10:53 PM.
nunotins14 is offline  
Old 1st October 2007, 06:41 AM   (permalink)
Default

Check out AVRFreaks.net, plenty of information and resources there. Cheap programmers included.

An AVR running at 5MHZ will runs instructions as fast as a PIC16F84A will at 20MHZ. The PIC can't even compare on a clock per clock basis for instruction and I/O speed, even higher end PICS which have internal PLL's can't run at significantly fast enough speeds to make up for the 4X clock to instruction cycle divisor (could be wrong on that).
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is offline  
Old 1st October 2007, 09:05 AM   (permalink)
Default

Quote:
Originally Posted by Sceadwian
Check out AVRFreaks.net, plenty of information and resources there. Cheap programmers included.

An AVR running at 5MHZ will runs instructions as fast as a PIC16F84A will at 20MHZ. The PIC can't even compare on a clock per clock basis for instruction and I/O speed, even higher end PICS which have internal PLL's can't run at significantly fast enough speeds to make up for the 4X clock to instruction cycle divisor (could be wrong on that).
But PIC assembler is more efficient, any speed differences are fairly small, with the higher end PIC's being faster than the AVR's.

But in any case, speed is only very rarely of any importance - probably most of the time a processor is just wasting time.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 2nd October 2007, 01:09 AM   (permalink)
Default

How specifically is PIC assembler more efficient? Also what about complexity? Basic code in ASM specifically is a lot easier to understand on an AVR than it is a PIC, they both might be RISC based but the similarities stop there. A speed difference of 4 to 1 per clock is pretty big by anyones standards, which specific higher end PICS are you referring to vs which specific AVR's?

DSPIC's can't be included of course because they're not really a 'PIC' much like an AVR32 isn't an 'AVR'
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Why choose PIC instead of other microcontroller? StupidDum Micro Controllers 33 21st October 2007 08:28 AM
Programming the Mini-Max 8051 microcontroller blimon Micro Controllers 8 13th July 2005 03:42 AM
Answers for cisco test faiz General Electronics Chat 0 13th July 2004 04:06 PM
Connection of Siemens c167 microcontroller to peripherals. Roslan Electronic Projects Design/Ideas/Reviews 3 23rd March 2004 07:52 PM
Interfacing a microcontroller with a modem matt_d82 General Electronics Chat 3 21st March 2004 03:43 AM



All times are GMT. The time now is 06:27 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker