Go Down

Topic: Clarification about Arduino Atmega and AVR Programmer (Read 4281 times) previous topic - next topic

PlainC

Hi guys,

I have several questions about the Arduino board and embedded systems programming that i couldn't find answers to these questions.
I understand the basic steps for getting started as below:
Normally you need the following items in order to start programming a Microcontroller :
1- Microcontroller (The Chip it self)
2- Breadboard and required wires and related items (leds resistors etc) to make the circuit and prober connection with the Chip
3- AVR Hardware Programmer; a hardware device for connection and communication with the Microcontroller like (uploading code)
4- Text Editor or a preferred IDE
*** If the microcontroller is pre-loaded with a "bootloader" then you can write and upload code via the USB connection***

Now, if I use the Atmega microcontroller as standalone, should i get default C library for the microcontroller I/O operations like blinking and sort of things from the Atmega maker?

Not sure if Atmega I/O functions are the same as the function names used inside the Arduino IDE?
Can i use the Arduino specific sensor library with my standalone Atmega microcontroller to program it with that library?

I ask these questions, because i want to use another microcontroller in the future like the ones from (microchip company).

Thank you,



fungus

It's all exactly the same code, libraries, IDE, everything.
Advanced Arduino

PlainC

Thanks for your answer,

This means i can use for example; the NewPing Ultrasonic Sensor library for Arduino, with other microcontrollers?

fungus


This means i can use for example; the NewPing Ultrasonic Sensor library for Arduino, with other microcontrollers?


You haven't said what "other microcontrollers" means.

Advanced Arduino

PlainC



This means i can use for example; the NewPing Ultrasonic Sensor library for Arduino, with other microcontrollers?


You haven't said what "other microcontrollers" means.




Using Microchip PIC10F322.


Robofarmer

Ha ha, nobody seems to know what to respond. I'm a little confused too.
Why all the questions about ATmega if your chip is a PIC?
AVR and PIC are two different animals. Have you googled "How to program PIC"? I'm pretty sure an AVR programmer is not going to do it, there are programmers specifically for PIC.

PlainC


Ha ha, nobody seems to know what to respond. I'm a little confused too.
Why all the questions about ATmega if your chip is a PIC?
AVR and PIC are two different animals. Have you googled "How to program PIC"? I'm pretty sure an AVR programmer is not going to do it, there are programmers specifically for PIC.



Hi Robofarmer,

Thank you for your answer.

The question is, can I use NewPing Ultrasonic Sensor library for "Arduino" with a standalone ATmega and other chips like PIC from microchip?

Or the library is written specifically for "Arduino ATMega" and won't work with different chips?

Yes, I googled "How to program PIC" and i saw different functions names being used for the blinking example. I thought every Chip will have its own basic library for I/O pin modes operations.

It was my pleasure to read your answer, and it was very useful to me.


fungus




This means i can use for example; the NewPing Ultrasonic Sensor library for Arduino, with other microcontrollers?


You haven't said what "other microcontrollers" means.


Using Microchip PIC10F322.


In that case the answer is "no". Almost everything about PIC programming is different.

(and you've wasted everybody's time)
Advanced Arduino

Robofarmer

Yes and then no and then yes-ish.

It will work with standalone ATmegas yes, but other MCU's no.

The libraries are written specifically for Atmel ATMegas, whether it's on an Arduino board or not.

Each brand of microcontroller has their own machine code.

Also, referring back to your original post, you can use a USB connection to program a microcontroller only if it has a bootloader AND is on an Arduino board.

Robin2

Wouldn't it be simpler just to use an Atmega chip?

Why do you feel the need to use a PIC if you already know how to use the Arduino system?

There is nothing wrong or inferior (or superior) about PICs - they are just different in the same sense as English is different from French.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

PlainC





This means i can use for example; the NewPing Ultrasonic Sensor library for Arduino, with other microcontrollers?


You haven't said what "other microcontrollers" means.


Using Microchip PIC10F322.


In that case the answer is "no". Almost everything about PIC programming is different.

(and you've wasted everybody's time)


You are not entitled to read or answer any questions. If you feel my posts are poorly phrased and confusing AND (time wasting); then don't be part of these posts.

Robin2


You are not entitled to read or answer any questions. If you feel my posts are poorly phrased and confusing AND (time wasting); then don't be part of these posts.


I think you need to be a little more careful here. It takes time to read your post even if one then decides to ignore it.

This is clearly an Arduino forum and not a PIC forum. As far as I know there are plenty of places to get PIC advice if that's what's required.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Robin2

I have just received the following personal message from @PlainC

Quote
I pointed my comment to the other member NOT you. My post clearly talks about microcontrollers and this is MCUs forum section! don't you read english?!!!!!

You screwed the whole usefulness of this post.
Stop abusing people.


Needless to say I don't like it. If there is any more of it I will report @PlainC to the moderator.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

PlainC


I have just received the following personal message from @PlainC

Quote
I pointed my comment to the other member NOT you. My post clearly talks about microcontrollers and this is MCUs forum section! don't you read english?!!!!!

You screwed the whole usefulness of this post.
Stop abusing people.


Needless to say I don't like it. If there is any more of it I will report @PlainC to the moderator.

...R


I already did report you  {Robin2}  to the moderator for your abusive childish behavior. and I'll continue to do so, unless you manage to respect others in this forum.

AWOL

Quote
You are not entitled to read or answer any questions.

This is utter nonsense.

I'm viewing your report to moderator as vexatious - don't repeat it.

Go Up