Liste des Groupes | Revenir à se design |
Jan Panteltje <alien@comet.invalid> wrote:>
Yes it all depends, I still have my old 8052 BASIC computer:
https://panteltje.nl/pub/8052AH_BASIC_computer/8052AH_BASIC_computer_inside2_img_1757.jpg
wrote an assembler for it so I could do inline assembler in the BASIC.
I used 5 pole audio connectors to make teh i2c bus external, with sensors and stuff connected to it all around the house.
from before year 2000.
Around 1985 I planned to build a Z80 machine, but then I got ZX Spectrum
and there was no need to build it.
>As to PIC serial code>
As you can see from the below example, PIC asm is very simple and straight forward.
That is the code in my GPS based radiation meter / logger with OLED display and SDcard storage:
https://panteltje.nl/panteltje/pic/gm_pic2/
Still working 24/7 after all these years... can hear it ticking on rasiation, logs to a Raspberry Pi 4 4 GB via a serial to
USB adaptor.
ASM code:
https://panteltje.nl/panteltje/pic/gm_pic2/gm_pic2-0.8.asm
I like to comment in the code, but it is basically very simple.
Well, I used to think "assembler requires comparable effort to C and
is more efficient", but then I looked how much time both take
and compared efficiency: assembler may be more efficient but
efficient assember requires significantly more effort than C.
One can write assembler in a way that saves effort, but then
it tends to be less efficient than output of a good C compiler,
and still takes a bit more effort than C. You may be used
to assembler, but if you are used to both, then reading C is
easier than reading assembler.
Anyway, I see no reason to use PIC-s, from normal sources
I would have to pay more for them than I pay for STM32 and
I see no special advantage of PICs.
>
BTW: It seems that there are few thousends of instructions in
your code, AFAICS object code for such a program when compiled
for something like STM32 would be of comparable size and C source
would be smaller.
Les messages affichés proviennent d'usenet.