What is the Best Micro-Controller for a Beginner to Use for Coding in C?

  • Thread starter Yportne
  • Start date
  • Tags
    Micro
In summary: Basic...programming.In summary, the newbie is looking for a microcontroller to toy around with and is using a basic stamp as his basis for knowledge. He needs a C compiler and uC with enough memory for data storage. The basic stamp is actually a PIC uC with an interpreter so that you can use PBASIC. PICs or AVR uCs can all be programmed very easily using (freely) available C compilers. He has looked at the C Stamp and the Picaxe chips.
  • #1
Yportne
21
0
hey guys...i'm looking for a micro-controller to toy around with. I'm a newbie so bare with me with a couple newbie questions...Is their a micro that can run straight c code or do I have to do it in assembly?

I need it to be able to store a little bit of data much like a variable stores data...only a few kilobytes worth.

I also need to to be able to do simple computing on the data much like a basic C program could do with logic operators and basic I/O with other parts.

Does this make sense or am I a little lost? I've found many micro controllers but I don't understand their spec sheets and I can't find their assembly data sheet that shows me how to code them :(I bought and complete a micro-controller education kit that showed me how to code a basic stamp...so I'm kind using that as my basis for micro-controller knowledge. With a stamp I can move a servo, light up LED's change how fast they blink etc.
 
Engineering news on Phys.org
  • #2
Yportne said:
hey guys...i'm looking for a micro-controller to toy around with. I'm a newbie so bare with me with a couple newbie questions...


Is their a micro that can run straight c code or do I have to do it in assembly?

I need it to be able to store a little bit of data much like a variable stores data...only a few kilobytes worth.

I also need to to be able to do simple computing on the data much like a basic C program could do with logic operators and basic I/O with other parts.

Does this make sense or am I a little lost? I've found many micro controllers but I don't understand their spec sheets and I can't find their assembly data sheet that shows me how to code them :(


I bought and complete a micro-controller education kit that showed me how to code a basic stamp...so I'm kind using that as my basis for micro-controller knowledge. With a stamp I can move a servo, light up LED's change how fast they blink etc.

All you need is to get a C compiler for the uC that you want to use, and obviously choose a uC that has enough memory for the data storage that you intend.

I think we discussed C compilers for the PIC uCs in a thread a while back. I'll see if I can find it with a search...

Welcome to the PF, BTW!
 
  • #3
Yportne said:
I bought and complete a micro-controller education kit that showed me how to code a basic stamp...so I'm kind using that as my basis for micro-controller knowledge. With a stamp I can move a servo, light up LED's change how fast they blink etc.

The basic stamp is actually a PIC uC with an interpreter so that you can use PBASIC. PICs or AVR uC can all be programmed very easily using (freely) available C compilers.

Have you looked at the C Stamp?
http://www.c-stamp.com/index2.htm
 
Last edited by a moderator:
  • #4
berkeman said:
I think we discussed C compilers for the PIC uCs in a thread a while back. I'll see if I can find it with a search...

Here is one thread I was thinking about:

https://www.physicsforums.com/showthread.php?t=178088

And here is the search that I used to find it (Advanced Search for the word compiler in any of my posts in the EE forum:

https://www.physicsforums.com/search.php?searchid=1924715

That hit list may give you other ideas...
 
Last edited by a moderator:
  • #5
Hey guys thanks for the replys!

But I have another question. In that other thread posted above they mentioned they were straying from pic's because of the start up cost being say $200 or more for a dev-kit.

Can you not just buy a pic, download a compiler and attach it to a breadboard? What is a dev-board? Is that the little circuit board that my basic stamp came with that has a serial port hooked to it to load up your code?

Do i need a dev kit for each different pic or is their one kit per family of uC's?
 
  • #6
If you don't need great speed and can program in Basic, have a look at Picaxe chips.
The language is very much like the Stamp but the chips are nowhere near as costly.

The chips cost about $5 to $20 (depending on type) and the programming editor is free. The cable from your computer costs about $10 to make or you can use an old serial mouse cable. It only uses 3 wires.

The chips have an impressive range of tools built in and they are very simple to get going. Lots of fun too.

Have a look at :
http://www.phanderson.com/picaxe/
if you are in the USA

Get the free software and chips from :
http://www.rev-ed.co.uk/picaxe/

These chips just go in normal IC sockets so you don't need the expensive "development kits". Just wire them up yourself.

The chips still have the original PIC numbers on them, but the bootlooader let's you do easy programming without the bit bashing of assembler. They cost about the same as the original chips because of bulk buying.
The serial bootloader is not available though. That is Rev-Ed's property.
Easy programming reduces development times so serious programs can be produced very quickly.

Here is a typical fragment of code from a NiMH battery charger program. The comments at the right are ones I just added.:

Start: '...label

Readadc10 0,w1 '...read the 10 bit ADC port

pause 1000 '....wait one second
high portc 5 '.....put 5 volts on one pin
pause 1000 ' .....wait one second
low portc 5 ' ....put 0 volts on the same pin

if w1>1000 then start '...check for overvoltage

w3 = w1*49/100 '...integer arithmetic

You could have a look at this earlier post:
https://www.physicsforums.com/showpost.php?p=2314873&postcount=14
 
Last edited:
  • #7
Yportne said:
Hey guys thanks for the replys!

But I have another question. In that other thread posted above they mentioned they were straying from pic's because of the start up cost being say $200 or more for a dev-kit.

Can you not just buy a pic, download a compiler and attach it to a breadboard? What is a dev-board? Is that the little circuit board that my basic stamp came with that has a serial port hooked to it to load up your code?

Do i need a dev kit for each different pic or is their one kit per family of uC's?

A full dev kit (with simulator, in circuit debugging / emulation) will be costly (usually in the $200 to $400 range, IIRC) However, programmer-only arrangements are a lot cheaper (around $50), especially those that use in-circuit programming (TIP: buy a breadboard).

Microchip has the PicKit 2 or PicKit 3 which program the majority of their chips (see the documentation for specifics). MPlab is free, but C compilers for PIC are not (the official Microchip ones are free for student use, but lose a little of their optimization after the trial period).
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805&part=DV164120

ATMEL has the AVRISP mkII, which likewise programs the majority of their chips (again, see the documentation for specifics). There is a free (and widely-used / supported) GCC port available (unlike PICs, which were designed to be programmed in assembly, ATMEGAs were designed to be programmed in C)
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3808

These programmers are available at DigiKey, Mouser, and the likes. Probably not the 'Shack, however. You can buy more 'universal' programmers on eBay, but quality / compatibility / support varies a great deal. You can buy something like the Xeltek (which actually will work and program a huge number of chips), but will set you back a grand or two.
 
Last edited by a moderator:
  • #8
Hey guys I've done some toying around. I managed to obtain mplab along with a c-compiler so i think i'll toy around with some PIC's.

I'm eyeballing the PIC16F1937. It only has 14kB of program memory, is that a pretty simple program or does the program condense when it's compiled to machine language? I'm wondering how much you can do with 14kB as i haven't really made a micro-controller program before...
 

1. What factors should I consider when selecting a microorganism for my experiment?

When selecting a microorganism, it is important to consider factors such as its growth requirements, metabolic capabilities, and genetic characteristics. You should also consider the purpose of your experiment and whether the microorganism is suitable for your research goals.

2. How do I determine the optimal growth conditions for a microorganism?

The optimal growth conditions for a microorganism can vary depending on the species and strain. It is important to consult literature and databases to determine the ideal temperature, pH, and nutrient requirements for your chosen microorganism. You may also need to perform preliminary experiments to determine the best conditions for growth.

3. What are some common techniques for selecting and identifying a microorganism?

Some common techniques for selecting and identifying a microorganism include microscopy, biochemical tests, genetic analysis, and culturing on specific media. Each of these methods has its own advantages and limitations, so it is important to choose the most appropriate technique for your specific experiment.

4. Can I use multiple microorganisms in one experiment?

Yes, it is possible to use multiple microorganisms in one experiment, especially if you are studying interactions between different species. However, it is important to carefully plan and control for any potential interactions between the microorganisms to ensure accurate results.

5. How can I ensure the purity of my selected microorganism?

To ensure the purity of your selected microorganism, it is important to maintain sterile techniques throughout the experiment. This includes using sterile equipment and media, properly handling and storing the microorganism, and regularly checking for contamination. It may also be helpful to perform periodic purity checks using microscopy or culturing techniques.

Similar threads

  • Electrical Engineering
Replies
4
Views
1K
  • Electrical Engineering
Replies
21
Views
23K
Replies
2
Views
993
  • Electrical Engineering
Replies
15
Views
2K
Replies
1
Views
4K
  • Electrical Engineering
Replies
1
Views
2K
  • Electrical Engineering
2
Replies
41
Views
5K
  • STEM Academic Advising
Replies
3
Views
910
  • Electrical Engineering
Replies
5
Views
2K
  • Electrical Engineering
Replies
1
Views
2K
Back
Top