EmbeddedRelated.com
Forums
Memfault Beyond the Launch

what is better C or basic in programming AVR

Started by karim_okasha_1988 August 9, 2007
it is my first time to use AVR and I want to ask what is better
learning c or Basic to use in programing AVR
On Thu, Aug 09, 2007 at 09:15:16AM -0000, karim_okasha_1988 wrote:
> it is my first time to use AVR and I want to ask what is better
> learning c or Basic to use in programing AVR

C.

--
David Kelly N4HHE, d...@HiWAAY.net
=======================================================================Whom computers would destroy, they must first drive mad.
use c language is better than basic lang.

karim_okasha_1988 wrote: it is my first time to use AVR and I want to ask what is better
learning c or Basic to use in programing AVR
Why? Why is C better?

--- In a..., David Kelly wrote:
>
> On Thu, Aug 09, 2007 at 09:15:16AM -0000, karim_okasha_1988 wrote:
> > it is my first time to use AVR and I want to ask what is better
> > learning c or Basic to use in programing AVR
>
> C.
>
> --
> David Kelly N4HHE, dkelly@...
>
======================================================================> Whom computers would destroy, they must first drive mad.
>
On Fri, Aug 10, 2007 at 06:41:59AM -0000, trimbitassorin wrote:
> Why? Why is C better?
>
> --- In a..., David Kelly wrote:
> >
> > On Thu, Aug 09, 2007 at 09:15:16AM -0000, karim_okasha_1988 wrote:
> > > it is my first time to use AVR and I want to ask what is better
> > > learning c or Basic to use in programing AVR
> >
> > C.

The original question was "which" not "why".

C is better because you have more control. Basic is older but C is more
mature. Differing vendors' C implementations are more alike than
differing Basic implementations. C is so good that the first thing every
new CPU _must_have_ is a C compiler. Learn Basic and solve the immediate
problem, learn C and solve all future problems.

--
David Kelly N4HHE, d...@HiWAAY.net
=======================================================================Whom computers would destroy, they must first drive mad.
For a GOOD programmer, C is better because there is a standard, it is more
structured, probably

faster, probably more compact code, easier to support, etc.

Basic might be easier to get yourself up and running, if your goal is to
just get it working, not

learn to be a good programmer.

_____

From: a... [mailto:a...] On Behalf Of
trimbitassorin
Sent: Thursday, August 09, 2007 11:42 PM
To: a...
Subject: [Spam] [AVR club] Re: what is better C or basic in programming AVR

Why? Why is C better?

--- In avrclub@yahoogroups .com, David
Kelly wrote:
>
> On Thu, Aug 09, 2007 at 09:15:16AM -0000, karim_okasha_1988 wrote:
> > it is my first time to use AVR and I want to ask what is better
> > learning c or Basic to use in programing AVR
>
> C.
>
> --
> David Kelly N4HHE, dkelly@...
>
======================================================================> Whom computers would destroy, they must first drive mad.
>
> ... Basic might be easier to get yourself up and running if your goal
is to just get it working, not learn to be a good programmer...

_Everyone's_ goal is to get it working [quickly] and if Basic got it
working more quickly than C, Basic might well have be the better choice
of language. No good programmer doesn't use C? Absurd.
Tom
If this is a student project, or a professional task, by all means use C.

If it's a hobby activity, and you want to concentrate of quick and easy,
then I suggest ZBasic.net. Very fast development for a Virtual Machine
target on the AVR. Structured BASIC very similar to MS Visual Basic 6. Has
RTOS built-in.

There *is no* "BASIC" for microcontrollers in popular use. The ones that
exist are uniquely defined sets of keywords and differ greatly, e.g., BASCOM
for the AVRs, and the defunct but good FastAVR. BASCOM is simplified to the
point where it cannot compile A = B + C + D. But beginners use it. Problem
is that as "training wheels" for new programmers, this kind of Basic
imprints some terrible coding techniques.
On Aug 11, 2007, at 12:34 PM, steve childress wrote:

> If this is a student project, or a professional task, by all means
> use C.
>
> If it's a hobby activity, and you want to concentrate of quick and
> easy,
> then I suggest ZBasic.net. Very fast development for a Virtual Machine
> target on the AVR. Structured BASIC very similar to MS Visual Basic
> 6. Has
> RTOS built-in.

Thats why I say C provides more control. An RTOS in Basic is a vendor
enhancement to the language and will not be found anywhere else. One
has very little control over the runtime environment.

> There *is no* "BASIC" for microcontrollers in popular use. The ones
> that
> exist are uniquely defined sets of keywords and differ greatly,
> e.g., BASCOM
> for the AVRs, and the defunct but good FastAVR. BASCOM is
> simplified to the
> point where it cannot compile A = B + C + D. But beginners use it.
> Problem
> is that as "training wheels" for new programmers, this kind of Basic
> imprints some terrible coding techniques.

Which reinforces my earlier statement that if one's goal is to solve
the immediate problem then learning a vendor's Basic may suffice. If
one wishes to solve this problem and all future problems then C is
the solution.

One of the problems with Visual Basic is that it locks one into
Microsoft Windows. One of the problems with Microsoft Windows is that
many things can only be done in Visual Basic.

What you learn in C today on one CPU will translate to any other CPU
or OS.

--
David Kelly N4HHE, d...@HiWAAY.net
=======================================================================Whom computers would destroy, they must first drive mad.
c is better than basic because it gives u the power of pointers, while basic is far away

dilip silga wrote: use c language is better than basic lang.

karim_okasha_1988 wrote: it is my first time to use AVR and I want to ask what is better
learning c or Basic to use in programing AVR

Memfault Beyond the Launch