go_away

Author Topic: Microcontroler help  (Read 3059 times)

0 Members and 1 Guest are viewing this topic.

Offline 555 timer chip guyTopic starter

  • Full Member
  • ***
  • Posts: 105
  • Helpful? 0
Microcontroler help
« on: April 30, 2007, 08:29:52 AM »
what determines what a microcontroller can be programed in.

Offline Hal9000

  • Supreme Robot
  • *****
  • Posts: 338
  • Helpful? 0
Re: Microcontroler help
« Reply #1 on: April 30, 2007, 09:23:12 AM »
Hey dude, check out this:

http://www.arduino.cc/

If i were to start my robotics journey again, here is where I would start

Look at all the lovely, ready to use tutorials:

http://www.arduino.cc/en/Tutorial/HomePage

*drool*
"The truth is, you can't hide from the truth, cos the truth is all there is" - Handsome Boy Modeling School

Offline nanob0t

  • Robot Overlord
  • ****
  • Posts: 145
  • Helpful? 0
  • Trust Your Technolust
Re: Microcontroler help
« Reply #2 on: April 30, 2007, 11:07:44 AM »
Hey dude, check out this:

http://www.arduino.cc/

If i were to start my robotics journey again, here is where I would start

Look at all the lovely, ready to use tutorials:

http://www.arduino.cc/en/Tutorial/HomePage

*drool*



That's pretty neat.

I don't think anything really determines what a microcontroller is programmed in.  The microcontroller is just a piece of hardware with electronics in it.  A manufacturer just creates the chip and chooses a programming language to program their chip in and specifies in it.  The PICs are capable of being programmed in a few languages, but it's very very costly. 

I'm not too sure about this, but it's mostely just a manufacturer's decision.  Though, there may be something within the chip that only allows it to understand one language.  I don't know.  I wouldn't go trying to messing with hacking them, although it's probably possible.

It would be worth looking into though.

If you find anything out, I am interested in seeing it.

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Microcontroler help
« Reply #3 on: April 30, 2007, 11:16:11 AM »
hey 555 timer chip guy,

so pretty much all microcontrollers can be programmed in some sort of machine code or assembly language.
most microcontrollers have some sort of interpreter that can convert some other higher level language into machine code for that microcontroller.

so in answer to your initial question, somebody needs to write an interpreter from your desired language to the machine code your microcontroller can understand.
then you run your code (written in C or Basic or something like that) through the interpreter.
the interpreter converts it into machine code that your microcontroller can understand and run.

sometimes an interpreter is provided by the microcontroller manufacturer. (eg. AVRs.)
sometimes it is sold by 3rd part companies. (eg. PICs.)
sometimes you can find an open source one. (eg. GCC for AVRs along with many other platforms.)

it is possible to write your program directly in machine code if you want but it will take a bit longer.

dunk.

Offline 555 timer chip guyTopic starter

  • Full Member
  • ***
  • Posts: 105
  • Helpful? 0
Re: Microcontroler help
« Reply #4 on: April 30, 2007, 12:06:41 PM »
thank you

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: Microcontroler help
« Reply #5 on: April 30, 2007, 04:33:45 PM »
yea what dunk said.

to simplify, you can program in any language you want.

you just need a compiler that changes what you write into machine code that is readable for the particular microcontroller you want. that machine code is determined by the manufacturer.

any language -> compiler -> machine code

you just need to find a compiler that works with your perfered language

Offline 555 timer chip guyTopic starter

  • Full Member
  • ***
  • Posts: 105
  • Helpful? 0
Re: Microcontroler help
« Reply #6 on: May 01, 2007, 08:27:36 PM »
yea what dunk said.

to simplify, you can program in any language you want.

you just need a compiler that changes what you write into machine code that is readable for the particular microcontroller you want. that machine code is determined by the manufacturer.

any language -> compiler -> machine code

you just need to find a compiler that works with your perfered language
but how do you find out what mechanical code the microcontroller is programed in.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: Microcontroler help
« Reply #7 on: May 01, 2007, 08:32:28 PM »
Quote
but how do you find out what mechanical code the microcontroller is programed in.
every single microcontroller is different.

instead, check the compiler and see if it lists your microcontroller number specifically. you will have to configure your compiler to work with that microcontroller before compiling, anyway :P

 


Get Your Ad Here