Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

The random microcontroller thread...

Status
Not open for further replies.

Z80

Full Member level 1
Joined
Feb 20, 2004
Messages
96
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,257
microcontroller random

What uC's have you been using? What is the greatest uC for you? What programming tools have you used for them? And why?

Well, let me start. Long ago I was a Z80 lover. Actually not a uC but a uP... Back then I had no idea what a high level programming language is, so I only used assembler language. Since I am a C/C++ programmer, and the discovery of the PICs, I am a Microchip man, and a HI-TECH one. ANSI compliance is a must for me, I really don't like someone who tells you "you'll have to learn our own C-like language", that turns me off all the times.
As for Microchip, you have on-chip flash, you have ICSP, you have a reasonable speed, you have very small packages, you have all the useful peripherals, you have small power consumption, you have great software tools, you have small prices. Well, others may have those too, but since I'm happy with what I have, why change? This may not be the greatest way to think of things, but, I admit, I'm guity of being too comfortable sometimes.
I've been considering to have a look at what Zilog did in the last... let me see, is it 20 years?, since they released Z80A I've never really had the oportunity to, but there is a probability that I may fall in love again with their products.
Also, I'd like to try Motorola and Atmel uC's, but again, I need something to get me started.
So, what about you?
 

mikrocontroller randomness

I have been using Atmel 8051, simple, but very usefull and with a wide selection of tools and a wide document base and code, and with diferent periperials. I also motorola hc08 different flavors, only to hate metrow*rks tools, and the board vendors.
Now i'm interested in ti msp430 and analog DSPs
 

bit manipulation in c microcontroller

I am using Cypress's PSoC. It combines nice analog + digital systems.
 

_nop microcontroller

Using plain ANSI-C compiler is a limitative solution for MCU programming.
Consider that with MCU you often need bit manipulation and bit variables, not well defined in ANSI-C (bitfields?? not very comfortable), and special instructions (nop, watchdog reset, ...) which ANSI-C don't cover.
So, every good C compiler for MCU permit you to use extended primitives to take advantage of MCU.
Regards. Paolo
 

psoc _nop c

psubiaco said:
Using plain ANSI-C compiler is a limitative solution for MCU programming.
Consider that with MCU you often need bit manipulation and bit variables, not well defined in ANSI-C (bitfields?? not very comfortable), and special instructions (nop, watchdog reset, ...) which ANSI-C don't cover.
So, every good C compiler for MCU permit you to use extended primitives to take advantage of MCU.
Regards. Paolo

Yes, but good compilers have minimal extensions to ANSI standard, and only when they are needed. HI-TECH for instance introduces the "bit" type for bit manipulation. This way I can set whatever bits in whatever register using the dedicated instructions if they are available (bcf/bsf for instance with PICS). And if those instructions aren't available, what is the difference from C to ASM when using a bitmask?
 

8051 + random

I think there is #pragma keyword to make chip-specific instaructions for the compiler.
 

dacadc said:
I think there is #pragma keyword to make chip-specific instaructions for the compiler.

So much the better.
 

dacadc said:
I think there is #pragma keyword to make chip-specific instaructions for the compiler.
Yes, but not only this. Often, compilers add instructions such as _nop(), _halt(), _clrwdt(), and other simple functions to set/clr port bits.

In MCU programming, very often you can declare the address of a variable using the syntax
type variable @ address; for example unsigned char status@0x40;

And if those instructions aren't available, what is the difference from C to ASM when using a bitmask?
There is only a difference in terms of code readability, expecially when you have lots of bit variables which are not correlated each-other....defining and using variables as bitfield is not concise.
 

I had expected that this thread would be more successful. I'd really like to start learning another microcontroller, but since the are zillions of them, I really don't know where to start :(
 

Z80, why change? You know microchip very well, so you have a good point to start from. Microchip is good expecially for non-complex applications.

BTW, I prefer holtek mcu, which are less expensive than microchip,and more and more companies in Italy ask for holtek MCU for this reason. Also, IDE environment/compiler is free, the ICE has a very very low cost (less than 300$) and parallel programming interface provide a very fast programming time (ok for mass production).

Holtek develop only simple MCU, with no more than 8kword (RISC architecture) of ROM, and is not Ok for firmware that need to store lot of strings in ROM (LCD or SERIAL alphanumeric communication?), so for some application I use Nex 78k family (powerful CISC core with some 16bit registers and powerful peripherals). This is a great micro, but due to the software flash programming algorithm, need lot of time to be erase/programmed: this is the only thing I detest of this micro.
Also, tools like compiler and programmer has a high cost... but if you need, you can find a Nec 78k MCU programmer for free from my site https://www.creasol.it/equipment : the software is available ini my site, works well in Linux, not very well in Windows using cygwin posix libraries. I hope that someone that has familiar with windows programming should port the software to windows!

I've used for a month Motorola HCS12 MCU... it has an architecture like Nec 78k, but has three great advantages over Nec:
1. It is very fast to be programmed
2. the flash should be programmed by the firmware itself
3. a very very very great compiler, Metrowerks Codewarrior, is available for this MCU (free of charge till 12Kbyte of code): it is the best compiler I have seend, with strong optimization...

Bye. Paolo
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top