strange winavr!!!!

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

hi all
i am programming AvR microcontollers for a bout 5 years BUT with BASCOM AVR.
now i started to progarm with winavr but all the things is stange in this compiler .
can any one help me to start ??

thanks

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

Tutorial Forum - you know it makes sense

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

Quote:
can any one help me to start ??
BASIC to C? You brain is in for a shock!!

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

js wrote:
Quote:
can any one help me to start ??
BASIC to C? You brain is in for a shock!!

what u mean ?
make it clear . i need advices.
thanks

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

segmex!
This is almost impossible to answer.

Is it the C language?
Is it the language specifics of the AVR-GCC compiler and/or the run-time support in avr-libc?
IS it the usage of the toolchain to get an executable (compile,link, makefiles, AVR Studio integration...)?

Tell us where you are and we'll help you from there! Done the LED-blinky?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Quote:
make it clear . i need advices.
BASIC pretty easy, C not so easy. It's a different language like English and Chinese.
Have you read up anything about C? There are lots of tutorials on the net on C. A lot of avr specific C stuff can be found in the Tutorial forum as suggested above.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

well

bascom avr is high level language for avr microcontrollers . it doesnt use register names to progarm uc.
for example when we wanna to config timer2 for RTC we type
config timer2=timer,async=on,prescale=128

NOW i need ti learn winavr........
Is this a complicated maze!!!

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

js wrote:
Quote:
make it clear . i need advices.
BASIC pretty easy, C not so easy. It's a different language like English and Chinese.
Have you read up anything about C? There are lots of tutorials on the net on C. A lot of avr specific C stuff can be found in the Tutorial forum as suggested above.

thanks
i know C but winavr for somehow stange how can i compile the code ?? how can i know my code have errors or not ??? how can...

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

Create a new GCC project, add your code then do a Build. If all is well you will get a .hex file, if not you will get a list of errors.

There are a couple of example projects in the winAvr example folder.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I don't think English-Chinese is really fair, English-French perhaps? They are both algorithmic languages and there's an argument to say that once you know one it should never take more than a wekk or two's study to learn any other (wish that were true for the switch from English to French, let alone English to Chinese!)

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

thanks for ur answers .
after googling i found out that two compilers is good BUT the quastion is :
which on is better to choose winavr OR codvision..

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

Take a look at the sticky threads at the top of the AVRForum, specifically the one that says, 'don't ask which compiler is best' and the one about 'General information about posting in the AVR Forum'. After reading those two, learn to use that search function since your questions so far have all be answered well in the past.

Wilbur

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

Quote:
I don't think English-Chinese is really fair,
Chinese starts with C...and just as complicated...so it's a fair comparison... :? :wink:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Bascom codes relies on somewhat "higher" language than C. I've inspect Bascom few years ago, it works simply just convert your commands like "config lcd bla bla bla" to a list of hardcoded lcd initialization algorithm.
So i think it's a little bit painful to convert any knowledge from Bascom to C. Sometime i thought it's more painful learning Bascom to C than assembly to C.
But chill off, take a week or two to learn the basic of C language structure and AVR related syntax & libraries and you are ready to make your very first working code, eg. like blinking LEDs :D or more advanced char LCD writting.
Compiler?
codevision is good since it uses wizards to do some register initialization if you want to use AVR's hardware peripherals, the machine code is smaller too for most apps i've ever built, but you just can compile not more than 4K (for the demo version) - another word, it's not free.
winavr is good for it's simplicity of installation and usage. I recommend you to use AVRStudio + WinAVR, so you don't need to mess with makefile at compilation time, but sometime it's good to learn what is makefile and what is it's purpose.

KISS - Keep It Simple Stupid!

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

Is their any diffrences between winavr and avr-gcc .

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

segmex wrote:
Is their any diffrences between winavr and avr-gcc .

Winavr is the GNU toolchain as a WINdows cross compiler for AVRs. Beside other tools it uses the gcc which is renamed to avr-gcc to have it seperate from other gcc compilers (x86, ARM,...)

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

Quote:

Is their any diffrences between winavr and avr-gcc .

http://winavr.sourceforge.net/ says

Quote:
WinAVRTM contains all the tools for developing on the AVR. This includes avr-gcc (compiler), avrdude (programmer), avr-gdb (debugger), and more!

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]