Can microcontroller be programmed this way?

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am new to microcontroller and arduino but i have some experience with all this.

I want to use microcontroller to use for several projects but i don't want to buy arduino because buying different arduino for different projects is not an good idea.

I thought of building my own arduino. But i was thinking if it is possible to program the microcontroller like ATMEGA328 without even using arduino but using the programming language used in the arduino IDE.

It means i want to use microcontroller atmega 328 but do not want to go for arduino but i am familiar with arduino programming language. So i want to know that is it possible to program the microcontroller directly using usbasp.

And will it be possible to use javascript to control microcontroller without arduino.

Last Edited: Fri. Feb 13, 2015 - 06:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So i want to know that is it possible to program the microcontroller directly using usbasp.

Yeah that's possible. At the end of the day (like most AVR development systems) what Arduino produces is a project.hex file. So you can take that .hex and feed it to avrdude running a USbAsp or whatever.

 

But why wouldn't you simply put Optiboot into the 328 you plan to use as your "standalone" Arduino. I suppose it's true you will need a way to connect the RX/TX pins of the 328 to your PC. For that most would spend $2..$3 at ebay and buy...

 

http://www.ebay.com/sch/i.html?_...

 

(wow $0.82 inc shipping for the cheapest one there - how on earth do they make any money out if this?!?!)

 

PS Just noticed your comment about "Javascript". Are you possibly getting Java and Javascript mixed up? It's true that the Arduino IDE itself is written in Java but it might just as easily do an identical job if it were written in C or C++ or Pascal or Lisp or Basic or even 80x86 Asm. It makes no difference to you as a user that it happens to be Java - the benefit for the developers is that the same code they write runs on Windows and Linux.

Last Edited: Fri. Feb 13, 2015 - 06:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i am not getting mixed up with java and javascript.

I am asking about using javascript to control microcontroller using browser with node.js framework

I don't know to much about it but heard of firmata and jonnny-five are used to do this.

So would it be possible to do that.

And thanks for that optiboot info.

Can you suggest me which one would be good for 328 and more micros.

http://www.flipkart.com/robosoft...

http://www.amazon.in/ELEMENTZ-PR...

http://www.ebay.in/itm/HOT-NEW-U...

http://www.shopclues.com/usbasp-...

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't know of any port of node.js to the Mega AVR, so running Javascript on one is probably not likely. I'm having trouble figuring out exactly what Firmata is. As far as I can tell it uses a standard communications protocol that sends commands to the Arduino. What I don't see explained is how the Arduino executes the commands. Is it somehow built into the bootloader?

 

Anyway, if you want to run Javascript natively, BeagleBone has a port of node called Bonescript that is very nice.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

LWalker wrote:
I'm having trouble figuring out exactly what Firmata is.

 

http://www.firmata.org/wiki/Main...

 

sends you to

 

https://github.com/firmata/arduino

 

which says,

 

Firmata is a protocol for communicating with microcontrollers from software on a host computer. The protocol can be implemented in firmware on any microcontroller architecture as well as software on any host computer software package. The arduino repository described here is a Firmata library for Arduino and Arduino-compatible devices. If you would like to contribute to Firmata, please see theContributing section below.

 

LWalker wrote:
As far as I can tell it uses a standard communications protocol that sends commands to the Arduino

That would, indeed, seem to be the case - except that it has nothing specifically to do with Arduino.

 

LWalker wrote:
What I don't see explained is how the Arduino executes the commands.

As the above quote says, you would need an application (or "sketch" in Arduinospeak) to do that - you could use their library...

 

LWalker wrote:
Is it somehow built into the bootloader?

No - you have to to support it - possibly using the library

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

itscoldice wrote:
I am asking about using javascript to control microcontroller using browser with node.js framework

Are you thinking that node.js would be running in the browser - or in the AVR?

 

The latter is, IMO, highly unlikely

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

itscoldice wrote:
I don't know to much about it but heard of ... jonnny-five

You mean this: https://github.com/rwaldron/john...

 

Seems to be a fair bit of description there, including various Supported Hardware lists - so why not start with one of them?

 

Guidance

Need help? Ask a question on the NodeBots Community Forum. If you just have a quick question or are interested in ongoing design discussions, join us in the Johnny-Five Gitter Chat.

For step-by-step examples, including an electronics primer, check out Arduino Experimenter's Guide for NodeJS by @AnnaGerber

Last Edited: Fri. Feb 13, 2015 - 11:26 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Now i will firstly go with micor's and then with firmata.

 

Is there any other software available rather than avrdude to program micro's through usbasp

Last Edited: Sat. Feb 14, 2015 - 02:24 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

node.js does runs on your computer (in browser by creating local server) it can be used to control arduino via some changes in bootloader

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've used Extreme Burner, works well for me.