An Ametuer Who needs Advice - Page 2

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: An Ametuer Who needs Advice
Quoted text here. Click to load it

No... yes... it depends.

The vast majority of embedded systems do not use an OS mush less
something like Linux with is NOT an RTOS.  I would not bother with Linux
unless you are looking at 32 bit systems and that is not the place to
start if you want to do the HW as well.

BTW about 1 in 3 embedded systems in the world is an 8051, About 80% are
8 bit systems in general.  It depends where you want to go.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England    /\/\/\/\/\
/\/\/ snipped-for-privacy@phaedsys.org       www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Re: An Ametuer Who needs Advice
snipped-for-privacy@yahoo.com (Devyn) wrote in message
Quoted text here. Click to load it

If you want something a hellofalot more interesting then this is a
terrific resource:-

http://www.FreeRTOS.org

(you might have to read up little on containers and their iterators
e.g. Stroustrup's C++).

Like the other posters say, patient slow progress is best!

Robin

Re: An Ametuer Who needs Advice
Quoted text here. Click to load it

Don't bother with the logic Analyser. Scope yes but buy a cheap dev
board.  They do you own but you won't need an LA to start with (if at
all)

Quoted text here. Click to load it

yes. but start with a cheap dev kit and look at the circuit diagram and
modify it.

small steps ....

designing you own and learning a logic analyser is a large step.

 
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England    /\/\/\/\/\
/\/\/ snipped-for-privacy@phaedsys.org       www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Re: An Ametuer Who needs Advice

Quoted text here. Click to load it


The eight bit processors are far too small for Linux. However, it does not
mean that they could not be applied to something useful. A full-blown
operating system (e.g. Linux) is far too heavy for the microcontroller-size
embedded projects.

What you need:
 - understanding of the electronics of an embedded system,
 - understanding of the machine code of the target processor,
 - plenty of patience, and
 - a real project.

The electronic understanding is a basic requirement: in most embedded
systems the processor is an essential part of the electronics, and a good
balance has to be found what to implement in hardware and what in software
(in this environment often called firmware). Often it's possible to simplify
the hardware to trivial by pushing the complex items to software.

The machine code understanding is essential after something does not work as
intended and you have to roll up your sleeves and dig into the dirty basics.
It's also very enlightening to read through the assembly code produced by a
compiler - there are often surprising differences between what you intended
to code and what the compiler has done. You can often tweak the source code
and evade the need to use an assembler module instead.

The need for patience is self-evident. I just have fresh experience after
three days of EMC testing and repairs (both electronic and software) for an
embedded system.

The real project will give you an opportunity to excercise the above skills.

IMHO, if you need something more than an eight-bit processor, I'd pick a
flavour of ARM.

HTH

Tauno Voipio
tauno voipio @ iki fi



Re: An Ametuer Who needs Advice
Quoted text here. Click to load it

 >Maybe your next project can be something like a motor
 >control (garage door opener?) that you can operate over the
Internet.
 >
 >Mike

 

  Hi Everyone!

 Thank you for the replies. Most of my profs. have been telling me to
avoid linux because its uneccessary for the kind of projects I do.
Well, I couldnt agree more. But the thing is, as with my other
projects, I realise that there's no better way to learn about a device
than to actually work on it. Books and the net cant take you as far as
projects will. My other projects may seem pointless, but the fact is
that they helped me know the devices inside out, program optimizing
(esp. the rover; its ALP was marvelous), cross compilers and the like.

So, here's what I'll do :-

Stick to C and cross compilers, tweaking the assembly they generate.
Work on a better project. In fact, I was already on it. I got this
idea from a micro-controller site. These guys controlled a stepper
motor over the net. I thought I could use a PIC (for starters; ARMs
are something i'm just beginnig to understand. I'm more confident with
PIC) as a Data Aquisition sys. for a comp. online and implement an
actuator elswhere. All controlled over the net. It'll take some time
before I can come with application that I can really put on paper, but
anyhow, I've made start.

Regards,
Devyn

Re: An Ametuer Who needs Advice

Quoted text here. Click to load it

    Linux won't help a bit with embedded micros, move on to the three or four
main languages used, Basic, Assembler and Forth.  Secondly I suggest that
you discover your field of interest for that should determine both the
micro and tools used.  Only then should you delve into detail.

Re: An Ametuer Who needs Advice
Quoted text here. Click to load it

C in 90%

Quoted text here. Click to load it
only by amateurs at home

Quoted text here. Click to load it
Definitely

Only by a few on some micros.


Quoted text here. Click to load it

agreed

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England    /\/\/\/\/\
/\/\/ snipped-for-privacy@phaedsys.org       www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Re: An Ametuer Who needs Advice

Quoted text here. Click to load it

    Do you have any data to support this guestimate?

Quoted text here. Click to load it

    Correct me if I'm wrong but the original post this thread responds to is
by a self-professed amateur.  Besides, there are more than a few
commercial products being used, like the Parallax family, in Basic.
Again, I'd have to ask for some data to support this guestimate.
 
Quoted text here. Click to load it

    On most micros however there is no correlation between the number of developers
using Forth
and the number of embedded control projects in use.
 
Quoted text here. Click to load it

--
-- Regards, Albert
----------------------------------------------------------------------
We've slightly trimmed the long signature. Click to see the full one.
Re: An Ametuer Who needs Advice
Quoted text here. Click to load it

Yes. Several studies dating from 1997. I could dig out the results but
since Forth and basic don't appear in some of them I doubt you would
accept them.

Quoted text here. Click to load it

So? That is no reason to use it. There are plenty of C tools and support
available from the free to the very expensive.  The point is that there
is a LOT of support for C for all levels. There is no need to tie one
self down to a less appropreate language just because some ametures use
it..

Quoted text here. Click to load it




This is true. The amount of forth in use probably dwindles even more if
you look ate the number of projects or indeed the number of installed
devices.

I have nothing against forth but an ammeter will get fat more help and
support (and tools) on a far wider variety of micros and application
types that he could from forth.

Quoted text here. Click to load it

This is probably more relevant.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England    /\/\/\/\/\
/\/\/ snipped-for-privacy@phaedsys.org       www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Re: An Ametuer Who needs Advice

<snip>

Quoted text here. Click to load it

I have no experience with the Hitech compiler nor with PICs, but Step 3
is not typical in any of the many development environments I have used.
The compiler should be responsible for its own optimizations.  Even in
unoptimized mode there should be few if any truly "extra" lines.  The
worst part is that doing this seperates ones source code from the object
code it represents.  This makes development and maintenance far more
difficult.

The only time I have done this kind of thing is when I used C as an
algorithmic starting point for a function that I knew would have to be
extremely optimized for speed.  In this case, only the assembly source
was used in the release build and the C source was included only as
comments in the assembly source to document the technique.

<snip>

--
========================================================================
          Michael Kesti            |  "And like, one and one don't make
We've slightly trimmed the long signature. Click to see the full one.
Re: An Ametuer Who needs Advice
Quoted text here. Click to load it

If you're trying to pass off compiler output as assembly-language
homework, as I suspect the OP might be doing, there probably will be
"extra lines" ;P

pete
--
snipped-for-privacy@fenelon.com "There's no room for enigmas in built-up areas."

Re: An Ametuer Who needs Advice

---------snip------------
Quoted text here. Click to load it

    Yes, it is a reason unless you are pursuing your own agenda.  The
gentleman originating this tread asked specifically for "amateur" help.  C
is not for amateurs and arguably not for low-level embedded applications.
At least not with optimization turned on.

Quoted text here. Click to load it

    Dogma again.  Forth is a well-hidden trade secret by most of my clients.
There is no way, again, that you can supply any meaningful statistics so
please discriminate between your opinion and reality.
 
Quoted text here. Click to load it

    Huh?  No tool is better than it's user.  Again, the number of products
has no correlation to it's quality.  Hmmm, a pattern is emerging here.
Instead of pushing your agenda why not give cites and evidence and let the
reader and original poster decide?


-- Regards, Albert
----------------------------------------------------------------------
AM Research, Inc.                  The Embedded Systems Experts
http://www.amresearch.com 916.780.7623
----------------------------------------------------------------------


Re: An Ametuer Who needs Advice


Quoted text here. Click to load it

I think you miss his point.  I suspect he means the number of *users* who
can provide support via forums like this is greater.

Ian


Re: An Ametuer Who needs Advice
Quoted text here. Click to load it

That is not true.... C is taught to 16 year olds at school.  C can be
used by anyone.  In fact one "amateur" I know is on the ISO C working
group.

Quoted text here. Click to load it

Then you are disagreeing with a LOT of professionals who use it for all
sorts of work including safety critical and medical from 8051's and Pics
upwards.


Quoted text here. Click to load it

Not that you have a hidden agenda for going against the majority of
professionals and ammeters who use C.

I don't  suppose you are commercially involved with Forth and Basic
tools?

Quoted text here. Click to load it

I can dig them out... (again)  I think it was 80% using C and Forth and
Basic around 10% about 5 years ago.

Basic usage has dropped (as have the number of supported tools) Forth?
You would know about that better than I as it is YOUR agenda but I would
bet it is not gaining in market share.


Quoted text here. Click to load it
This is true.

Quoted text here. Click to load it

Correct but in a large number of products there will be good ones and
cheap ones and good cheap ones and probably several that are just right
for you with a large users base you can cal on for help.

Where there is a choice of 2 or 3 with a small(er) user base the choices
are far more limited. Also with fewer users the tools tend to get less
usage and testing.

Quoted text here. Click to load it

Please do. It appears you have an agenda of pushing a language you
support commercially.  Lets throw it open. How many forth tools and
users are there out there?

Quoted text here. Click to load it

I don't suppose you represent a company that is pushing forth  and basic


?


/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England    /\/\/\/\/\
/\/\/ snipped-for-privacy@phaedsys.org       www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Re: An Ametuer Who needs Advice

Quoted text here. Click to load it
...

My company, MicroProcessor Engineering Ltd. (MPE), is a vendor
of Forth tools. We've been in business since 1981. Other Forth
vendors include Forth Inc, Triangle Digital, and New Micros.
MPE's clients make mobile phones, plan the construction of
airports, make mass spectrometers, access control systems
and telephone PABXs. Like all of the smaller compiler vendors,
we do a great deal of consultancy work. The bulk of our sales
is to professional programmers, but we do have 8051 tools
including hardware at around the GBP 64 (USD 100) price point.

Commercially, C is the equivalent of English among spoken
languages: it may not be the best, but it is the common language.
One day English may give way to another language.

In the programming world, all languages other than C/C++ have
declined in popularity with the exception of Java. Among the
minority languages, Forth is doing surprisingly well. I only
got into Forth because I was looking for a portable Pascal
compiler. Where are Eiffel and Modula 2 now? I really liked
Modula 2.

As I see it, there are three major areas for tool chains:
PCs; PDAs; and deep embedded. Traditionally Forth's strength
has been in deep embedded. These days, Forth compilers produce
optimised native code. The older threaded implementations
are obsolete except where code density is the overriding
objective. Forth can be classified as an interactive and
extensible language.

Where Forth scores is when you take advantage of interactive
development on the target. At the end of 2002, MPE was
involved in a bomb disposal machine project. The real
problems were in the mechanics and drives. Interactive
experiments wth the system gave us numbers about the world
we were controlling. Yes, those experiments could have been
obtained using C, but it would have taken very much longer.

For similar reasons, I find it much easier to explore the
Windows API from Forth than from C.

During the Europay Open Terminal Architecture project, an
OTA payment terminal program written in Forth was rewritten
in C. The target was an 8051. The Forth system occupied
32k bytes total including all O/S and hardware drivers.
The Keil 8051 C compiler exceeded 64k before all files were
linked. The C programmer was an excellent programmer and had
access to the Forth sources.

Our PowerNet TCP/IP stack with multi-threaded Telnet and
web servers (with CGI and ASP) on most CPUs fits into 112kb
including all the hardware drivers.

When you take advantage of Forth's interaction and
extensibility, you have a system that produces compact and
fast code. The proliferation of scripting languages for
desktop PCs shows that there are things that C does not
do well. Forth is one of those languages that is much
better than C in some areas. One size does not fit all.

Stephen

--
Stephen Pelc, snipped-for-privacy@INVALID.mpeltd.demon.co.uk
MicroProcessor Engineering Ltd - More Real, Less Time
We've slightly trimmed the long signature. Click to see the full one.
Re: An Ametuer Who needs Advice

Quoted text here. Click to load it

    16 year olds are taught to drive too but that says nothing about the
quality of their driving.
 
Quoted text here. Click to load it

    Right, I'm disagreeing with other professionals.  Other professionals
agree with me.  Insted of injecting your opinion provide some information
for the original poster to make an informed decision.


Quoted text here. Click to load it
clients.
Quoted text here. Click to load it

    Ok, now I understand.  Sorry, I'm not a spelling Nazi but really didn't
understand your useage of 'ammaters' above, I visualized an ampmeter.
Since people of different languages post here and I'm not that hot in
other languages I never speak against grammar or spelling in the
newsgroups however I really didn't understand 'ammeter'.  I did read your
website which is in English and describes you as a professional with a
list of credentials, mostly in C.
 
Quoted text here. Click to load it

    Then do so.  Note that the keyword here is 'meaningful'.  We both know
that statistics are only as good as the data and objectivity of the author.

Quoted text here. Click to load it

    Think so?  Remember this dialog began with the word "Amateur" in the
header.  Now, pick up a Circuit Cellar or Nuts & Volts and look at the
number of Basic products.  You may wish Basic away, I do too, but life
seldom wraps itself around our desires and goes its own way.  Much as we
both wish against Basic is here to stay, learn to live with it, I did.
 
Quoted text here. Click to load it

    You keep ignoring the orignal authors polite request and shoving your
agenda down his, and our collective, throats.  Instead of giving opinion
please provide some fact to substantiate your continued dogma.
 
Quoted text here. Click to load it

    Commercially?  I don't make a cent off my software, it's all free.  I
do provide both Forth and Basic but the lack of a profit motive gives me a
bit more objectivity here.  Please respond to the topic, not your agenda.

Quoted text here. Click to load it

    You needn't get defensive, just provide some facts instead of dogma.  If
you wish to open a thread on Forth I'll respond in detail there.  Here we
were discussing the (in)applicability of C for the 8051.  I strongly
disagree that C is appropriate for 8-bit micros while you count beans.


-- Regards, Albert
----------------------------------------------------------------------
AM Research, Inc.                  The Embedded Systems Experts
http://www.amresearch.com 916.780.7623
----------------------------------------------------------------------


Re: An Ametuer Who needs Advice

Quoted text here. Click to load it
clients.
Quoted text here. Click to load it

--
-- Regards, Albert
----------------------------------------------------------------------
We've slightly trimmed the long signature. Click to see the full one.
Re: An Ametuer Who needs Advice
Quoted text here. Click to load it


 Well, thank you all for the great responses. Speaking from an
'amateur' (i think i finally got the spelling right..) point of view,
I relish using C. I've been using ALP (assembly..) for quite some time
and i know the architecture inside out.

The reaon i use C is for simplicity. Consider this - How would you
implement a Look Up table, say for a stepper motor using ALP ?

eg.

LUT    ADDWF PCL,F
       RETLW VAL_1
       RETLW VAL_2
       .
       .
       .
       RETLW VAL_N
       RETURN

I've used 16F84 ALP

Looks simple? What confused was what if the code started in the
location 2FF? I would have to compensate by incrementing PCLATH which
would completely wreck the LUT logic i've used.

All this can be implemented in C with a simple switch case statement.
And an LUT is only an example. I cant tell you how simple things are
with C. Also, C is more understood than ALP. So, if i feel i have made
a logical error, i can post my query in an s/w group, refer to
registers as variables and have the problem solved.

Small wonder I've been using C for the past year.

Regards,
Devyn

Re: An Ametuer Who needs Advice
Hi, so you switched language because you couldn't understand how to do a table
look up? You are in big trouble.

Re: An Ametuer Who needs Advice
snipped-for-privacy@aol.com (CBarn24050) wrote in message
Quoted text here. Click to load it


 Tsk Tsk...

  I was merely giving an example while presenting my case. I've
implemented much more complicated codes with ALP while working on my
projects. YOU are in big trouble if you cant understand a simple
post...

Devyn

Site Timeline