microcontroller programming -- how to begin

In article , Leon wrote: [....]

So it has "N registers" where N is a small integer.

It is not "transversive" like the "transputer".

Each instruction does not encode the address of the next instruction to be done.

The program counter counts up[1] by a single instruction except in the branch cases.

The CPU is not heavily pipelined.

[1] Back when segmentation in the 8086 was introduced as "a way to improve code modularity", I pointed out that a program counter that counted down, (instead of up) would improve "top down design"
--
--
kensmith@rahul.net   forging knowledge
Reply to
Ken Smith
Loading thread data ...

In article , Joerg wrote: [....]

Some versions are now fairly quick. The Cygnal one is very speedy.

--
--
kensmith@rahul.net   forging knowledge
Reply to
Ken Smith

In article , Pooh Bear wrote: [...]

... well I can't show you ... so there.

My current project is something like 48K of assembly. Variable lifetimes require good documentation of all routines.

;******************************************* ;* Input: * ;* R0 Encablulation factor * ;* ACC Dingle arm state * ;* * ;* Output: * ;* R0 Adjusted for sin(EK) * ;* ACC Complimented[1] * ;* B Trashed * ;* Work1 Trashed * ;* * ;* [1] That is a very nice ACC we have * ;* here. * ;*******************************************

--
--
kensmith@rahul.net   forging knowledge
Reply to
Ken Smith

Ken Smith schrieb:

On the contrary, most of the free 8051 stuff is very old and of limited value, whereas for AVR there is a free, actively developed C compiler (AVR-GCC) and a free IDE for C/Assembler with a simulator (AVR-Studio).

Reply to
Andreas Schwarz

There are some application notes and diagrams for such a circuit on the TI website. Look for slaa149. After blowing the fuse, the device is still accessible through the BSL interface. Access can be gained by either erasing the device completely or knowing/guessing the 256 bit password. Brute-force attacking the password requires about 3.6*10^68 years.

Be carefull, the IAR system has some weird twists in its file / path management. A version I tried needed the main file of the project to be selected to compile properly. Otherwise it just wouldn't get the paths right. Ofcourse: -ploink- Back to the MSP430: look at

formatting link
for some alternative MSP430 tools. I've been using this for the last 2 years and I'm still happy with it. Just don't ask me about their debugger, I've never used it.

--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
Reply to
Nico Coesel

Ofcourse. I have limited time so I want to take the standard routines I write to other processors (including PC) as well. If I stick to non-harvard processors, I'm fine. For projects I work on cost of the uC is a complete non-issue. Time on the other hand is. I have a set of basic I/O and debugging routines that make it very easy to get a project up & running in no time on any non-harvard processor.

Stuff that took me days to write on the 8051 takes me just hours on a MSP430, Hitachi H/300 or Analog Devices Blackfin DSP. Even better, I can debug my software while compiled for the PC using PC style debugging tools and simply take the working code and recompile it for the uC.

--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
Reply to
Nico Coesel

Can you say the same about Micrsoft Windows ? :-))

--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
Reply to
Nico Coesel

Or IBM mainframe JCL? (If you haven't experienced it, look at

formatting link
which is the 10 lines of code necessary to copy a file.)

JCL is now in, I think, its 42nd straight year of widespread use. It is one of several software environments (COM is another) where I feel that everything is upside down -- the easy things are hard and the hard things are easy.

//

Reply to
mc

Actually, about 38th. I just checked. OS/360 was vaporware for the first 3 or 4 years :)

Reply to
mc

Hello Nico,

I just read in the docs (SLAU176a.pdf) that this tool will not allow blowing the JTAG fuse. Hmm. I just hope they'll fix it so you can blow it via SWB maybe using another tool. Else SBW won't be so useful for the field deployed stage.

Mine seems to insist that most of the files are in the program's directory. That would not be a good thing since I keep programs and data strictly separated.

Maybe I'll do that but I am a bit hesitant when it comes to open source stuff. Old saying, too many cooks can spoil the broth. I had the worst crashes I ever experienced with OpenOffice, to the point where I am about to quit using it. Twice the only way to get the laptop back to normal was to remove the battery. Even MS stuff hasn't crashed this badly.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

Hello Ken,

Sure but many of the really hot ones are single-sourced. Then I might as well take the single-sourced MSP430 and enjoy a 16-bit engine at the price of an 8-bitter.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

Look up IEFBR14. The same six lines do nothing. ...sometimes. ;-)

I think JCL predated OS360, but they both beat me by a decade.

--
   Keith
Reply to
krw

love using

else has to

Yes. But it's more instantly obvious in high level.

even keep

generates ~30k

BTDT ?

Badly witten then.

Some ppl might have that attitude - either for high or low level.

Graham

Reply to
Pooh Bear

They certainly would do. I like the compiler doing that. I'm sure it's better at that than me ! ;~)

Graham

Reply to
Pooh Bear

If it *works* what does it need developing for ?

Most of the extra 8051 goodies just need a new register declaration file which you can do yourself. Even PL/M wil handle 8 physical interrupt sources ( undocumented but I've done it )

Graham

Reply to
Pooh Bear

This is likely an untypical scenario for those using 8051s though.

Graham

Reply to
Pooh Bear

Windows hasn't been around that long. A better comparison would be DOS.

Graham

Reply to
Pooh Bear

Pooh Bear schrieb:

Yeah, why do version numbers above 1.0 even exist?

Using undocumented features of a long-dead programming language sounds like a great idea.

Reply to
Andreas Schwarz

Funny you should say that. i once released some software to manufacturing expecting

*someone* to find a bug and left it at V0.9.

No-one ever did find a bug so it never made it to version 1.

which

Stop to think about it and you might understand why it supports 8 and not 9.

Anyway I soent some time making sure it did work by examining the assembler output.

Graham

Reply to
Pooh Bear

damn

1985 is close enough. Ok, so an 8051 is 25% better than Windows.
--
  Keith
Reply to
krw

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.