Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Favorite Micro? I get bored.

Status
Not open for further replies.
Started on Z80, then 6502, then 6809 and then 68000, all in assembly . Moved to Pics and stuck with assembly. Eventually moved to C and never looked back. C works very well and just takes away the tedium of banking. Is anyone able to program the latest chips with asm? The pin allocations must be a nightmare.

Mike.
It works well... Once you conquer C you can combine assembly with C something you can't do if assembler is not a language you took on..

then Microsoft BASIC (10K of ROM),
Same... But as C was more for me... I had to try and back off from basic as I kept making far too many syntax errors.. Same as Pascal, going back is counter productive.... However!! Lazarus is nowhere near dead.. I absolutely love this interface.... I've seen some of your products using Lazarus.. I thought you were hooked.


NOTE TO JASON..... Sorry about the hijack... I thought that these posts were relevant to choice of micro!! Please forgive me...
 
If you dont use the libraries then you still need to learn the hardware. SSPCON1 = 0xnn is exactly the same as the asm equivalent but without the bank switching stuff.

Mike.
 
Last edited:
If you dont use the libraries then you still need to learn the hardware. SSPCON1 = 0xnn is exactly the same as the asm equivalent but without the bank swiching stuff.

Mike.
But with a ;
 
Nigel Goodwin
Ugh i miss Delphi ! I loved it so much. I also miss good old Visual Basic 6 :)

I have never seen or touched a Z80 or 6502 or 8080/86 .. i hear these were great and like the beginning for most people.
 
And I still forget them. And trying to get into the habit of writing if (false==variable) so if i miss the double equals it gives me an error.

Mike.

hah this has happened to me so many times but instead of an error it compiles and runs. When the PC reaches that line it just sets the variable and im screwed :( but i usually catch it before i get a headache.
 
Ugh i miss Delphi ! I loved it so much.
Lazarus is delphi…. That's why I use it... It's very well supported and supports the same units... Plus tons of addons...
 
hah this has happened to me so many times but instead of an error it compiles and runs. When the PC reaches that line it just sets the variable and im screwed :( but i usually catch it before i get a headache.
If you get into the habit of typing if (27=var) rather than if (var=27) then it won't compile and give an error.

Mike.
 
If you get into the habit of typing if (27=var) rather than if (var=27) then it won't compile and give an error.
Ah!! Herein lies another brick 27=var will yield incorrectly anyway as 27 will be a char by default!!! C's rubbish really ain't it!!


Acutally that statement is trolloxs… so ignore...
 
Last edited:
... it makes more sense to use C, once you're past the 'hardware learning' from assembler.

Perhaps in some cases, but there is still a lot of stuff that I can do in Assembly that I can't do in C .... There was one time I was told by the compiler something to the effect that there is not enough room in the target micro, please upgrade to a more suitable micro.

Doing it in Assembly instead, I finished the project in the original micro with only 43% code utilization.
 
For MANY years I have standardised on using two PIC chips for my projects using a micro controller.

For small projects I use the 16F628A
and for larger projects which need more I/O or an ADC, I use the 16F887.
Not only that but I program them using assembler.

Some may think that this is a rather blinkered view of the micro controller scene, but it suits me and my requirements.
I have two familiar friendly devices, so for the relatively few projects that I do using PICs, I have an easy choice.
I write my code in a modular form so that function blocks are reusable, for example when I want to control a AD9850 DDS, I just look into my code library and INCLUDE the AD9850 module and CALL the required functions.
Admittedly, this can leave a lot of unused redundant code on some project, but I have never run out of program memory yet.

All my work is hobby related, I don't have to please a paying customer who wants the "latest up to the minute field proven technology", a real oxymoron if ever there was.

JimB
 
... All my work is hobby related, I don't have to please a paying customer who wants the "latest up to the minute field proven technology", a real oxymoron if ever there was....

I have a current project that weighs in at 10 tons worth of metal and I have several PIC16F15323's sprinkled in various corners of the machine in a multi drop communication configuration all communicating to a central CPU. It's hard to believe that something the size of my finger nail can move mountains (< --- figuratively of course)
 
I have several PIC16F15323's sprinkled in various corners
If you don't mind me asking, how do they comunicate and what is the main processor, assuming you're using the pics as originally intended - Peripheral Interface Controllers - or is this a myth?

Mike.
 
Perhaps in some cases, but there is still a lot of stuff that I can do in Assembly that I can't do in C .... There was one time I was told by the compiler something to the effect that there is not enough room in the target micro, please upgrade to a more suitable micro.

Doing it in Assembly instead, I finished the project in the original micro with only 43% code utilization.

I fully agree, well written assembler is far better than compiled code - although you would 'probably' have been OK with the full (expensive) version of the compiler, the free one bloats the file size considerably.
 
Can I vote for CDP1802.. back in 1980 wrote a machine code 'DOS ' 5 1/4 floppy system in 2k UVEPROM ..(boot was in 256bits of battery backed cmos ram. moved to asm and Z80. then when i retired jumped in the deep end with asm PIC16, now mostly 'C' and PIC24FV32KA304 they can do most of my hobby 'play' .. did adventure in to ChipKit ( PIC 32 with arduino language Nooo :arghh: )
 
If you don't mind me asking, how do they comunicate and what is the main processor, assuming you're using the pics as originally intended - Peripheral Interface Controllers - or is this a myth?

It's a myth, MicroChip (and Arizona before them) have always maintained it doesn't stand for anything, and certainly not Peripheral Interface Controllers.
 
... If you don't mind me asking, how do they comunicate and what is the main processor, assuming you're using the pics as originally intended - Peripheral Interface Controllers - or is this a myth?

The communication is a multidrop serial interface where the output is essentially open collector using the internal pull up resistor (the internal pullup resistor is about 22k <- measured). The data is sent in the form of packets similar to MODBUS. Each micro has it's own programmable ID, where all of the micro's listen, and only respond when they are spoken to from the main controller. The main processor right now is a Laptop running a packet sequencer I wrote in EXCEL utilizing the built in VBA to send serial data. The EXCEL sequencer is only for testing but any processor capable of Serial could construct and send valid packets. Even thought the PIC16F15323 has a built in UART, I bit-banged my own because I needed some special auto-baud detection circumstances on the receiver front end. With the built in UART, you were limited to using only one initial character to time the bit period. In my case I needed at least two signifying a "Command" or "Request" to the receiving processor. The communication will autobaud up to 115kBaud. Using the NCO and PWM capabilities of the PIC16F15323, I could set and forget the output signal to the H-Bridge or Stepper controller glitch free of the incoming serial data. The Serial packet decoding is handled through the Interrupt, while the "slow" logic is handled in the main program area.
 
Can I vote for CDP1802.. back in 1980 wrote a machine code 'DOS ' 5 1/4 floppy system in 2k UVEPROM ..(boot was in 256bits of battery backed cmos ram. moved to asm and Z80. then when i retired jumped in the deep end with asm PIC16, now mostly 'C' and PIC24FV32KA304 they can do most of my hobby 'play' .. did adventure in to ChipKit ( PIC 32 with arduino language Nooo :arghh: )
If I know it right, still there are few space craft out there with the 1802. You eventually could assist to adapt them to the last Win 10 update.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top