开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育
Date

Programming Power

 

Seems like we have enough programming power (programmers) in this group that if Hans taps into it, the sky is the limit for the QSX. I wonder what the holdup is with the QSX, hardware of software,? or both?? The wait for it is excruciating.? I have the need for...... melting solder.? C'mon Hans, help about 10K of us solder melters out.


Re: More paddles and keys ...

 

Thanks for the suggestion Niels. That was one source of springs I hadn't thought of. Those that I've checked so far are either wrong ID for the 3mm screw or wound in wrong "sense" .

Continuing to look. Closest I've found is tensioning wire for net curtains but all I can get here are too small ID
Mike

On Mon, 25 Nov 2019, 19:34 Niels Jalling, <niels@...> wrote:
Take a look inside a ballpen from your pile of old pens.
73 de
OZ9NY Niels


Re: polling vs interrupts

 

Good Grief! I actually found one of my company's old brochures on line, and it features our Eco-C88 C compiler for MSDOS! That goes back over 30 years!


Jack, W8TEE


On Wednesday, November 27, 2019, 7:43:28 PM EST, ajparent1/KB1GMX <kb1gmx@...> wrote:


Bob,

We both have similar origins. Started with sequential logic and state machine in the 60s,
I was learning then.? First micro was 8008 here to and 8080, Z80, 6800, 6502, 1802, TI9900,
and all of the 8048/9, 8051, managed to avoid higher than 8086.? ?I tend to think in Z80 or
PDP-8 depending on mood.? PIC16/18/24 and Arduino are fairly recent for the IDE as
prior it was assembly?via MPlab since 2004.? ?Arduino its nice, handy, cheap but the
libraries are painfully large.? I think the worst is the SD, I had to write my own to access
the device as bare blocks.? I got tired of people telling me that SD/uSD can only be
FAT, so no not required.

Prior to micros were the PDP-8i and PDP10, was a DEC fan and even worked there for a
decade before the fold.

C back then was K&R, I got to talk to K fairly often as I used to call on Bell Labs back then.
In the early 80s BASIC and the early version of QB was popular, I still have the QB4 kit
likely the best Basic before visual.? Then C was considered "esoteric" and too big but PCs
with more than 640Kb was not yet the rule.? It would take a 386 and money to crack the
1mb space in the very late 80s.

I was running Pascal (UCSD) and SmallC (basically K&R) in 1979 when they more or less hit
the streets.? ?Still have the NothStar Horizon crate I used for them.? PC C was late but the
first version was SmallC then Avocet, Hitech-C and Nevada C.? ?No biggy I had PDP-11
and VAX [Unix V6 and 7, RT-11, RSX11, VMS] so PC were S100 and SBC CP/M
machines till the 90s.? I truly felt PCs are mostly computing step backward till networking?
and NT3.51 and NT4? that was a short window as back to Linux.? So I largely skipped
the 8088/880286 era as a Z180 at 12mhz and later a Z280 with 8mb had more apps
and could do most of the same things.? ?It was late CGA and VGA that made the
PC as then?graphics were better.? If you don't need pictures then instantly is
a measure that's hard to appreciate.? ?I can reach over and boot a real CP/M
machine, AmproLB+, Z80/4mhz,? 45MB SCSI drive and floppies or the Kaypro 4/84
with 1mb ramdisk and all the goodies.? ?

Big thing is my archive of electronics? docs and programs, the back up that is on three
systems one air gapped (No net connection for safety) as the bulk size is 137GB.?
So why invent new when copy old is an option.? A part of that is the release version
of the Unofficial CP/M archive back when Tim and I put that together (1996ish) and
on the net as it was.? I'm really glad that Gaby was willing take up the helm for that
and keep it alive.??

So yes I remember the days when a MPU have in the range of 1-4kb of eprom
and 128 bytes of ram on board were it.? Use C, your kidding.

Allison
--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.


Re: polling vs interrupts

 

That's pretty cool,? I've run into the Centronics interface many many times over the years.
Even designed equipment to use it.
Not many designs wind up getting used by so many.

Jerry, KE7ER


On Wed, Nov 27, 2019 at 05:29 PM, Bob Macklin wrote:
In 1973 I designed what became the standard Centroics interface used in CP/M and later MS DOS.


Re: polling vs interrupts

 

Yep. Virtually everything the sprintf() function does can be done with the str*() or mem*() standard library functions. True, sprintf() is a very powerful function, but most sketches waste a huge amount of memory using it, perhaps wasting 1.5K in some cases.

Jack, W8TEE

On Wednesday, November 27, 2019, 7:58:43 PM EST, ajparent1/KB1GMX <kb1gmx@...> wrote:


Jack,

The sprintf() in z80 asm is a monster too? (about 12bytes) but not 2k, it calls format()
which is nearly 1k bytes if you include its dependent calls. Most of its just not needed.

However there are so many callable simpler lib functions in there for the Z80 programmer.
I've seen similar with the Arduino Library.

I have a?putstr() that will output strings and the cost is much lower.? Its enough
that with smaller functions for conversion I can do formatted output without the bloat.
Build the string in ram then print it, basic pointer handling and small.

--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.


Re: #qcx CAT control #qcx

 

Some of you will remember the Bugbook Series written by Larsen, Rony, and Titus from what was called the Blacksburg Group. Long story short, I got an NSF grant to attend an NSF-sponsored seminar series taught by Larsen and Rony. As part of the course, we were given a KIM-1 as part of the course and used it for homework assignments. It used the Motorola 6500 chip. It was about the size of a deck of cards with a 7-digit LED display. Programming was done in octal, using all 256 BYTES of memory! That version of the chip only had an accumulator, no registers. There was a builtin page of memory starting at address 0 that was used for registers. It was amazing to me what you could do with that little memory. I later taught a Z80 assembler course at Butler (as part of the College of Business, since we had no CS department!). The Z80 systems (SOL-20's) had 16K of memory--thought I had died and gone to Heaven!

Jack, W8TEE

On Wednesday, November 27, 2019, 8:10:06 PM EST, ajparent1/KB1GMX <kb1gmx@...> wrote:


I'm one to appreciate what big and small are.? Save for VAX and PDP-11 with MMU
most of the MPUs I used were cramped on a good day.? Like 8049, you get 2k inside
any more than that and your a multi chip system and you hit that wall at 4K with
only 12bit address space so bank switching the upper 2k...? talk about ugly.

So 32KB (more like 16Kwords) is to me a lot of space compared to that.
But I'm still appalled with the IDE as even a simple program like blink
can suck down almost 1k of space.
--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.


Re: polling vs interrupts

 

Regarding resources required to run a C program:? ?Not much.

Back in the 90's, I designed hardware that used a Fujitsu SparkLite processor chip.
When first getting the board to work (and later for use in manufacturing) I needed some way
to tell me what was going on before the RAM was up.
I found I could write a C program placed at the power-up boot address (no crt0 code, no nothing)
and have it do significant diagnostics without using any RAM.
C code running on bare metal, using just the Sparc register set for volatile memory.

This Sparc had roughly 128 registers in hardware, the Sparc?"window pointer" into those 32 bit registers
allows you to access 8 globals, 8 from the previous context, 8 local variables, and 8 registers with stuff
to be passed on to the next context down.
The window pointer changes context with each function call (or return), so no need to save registers to
the stack in RAM.

As I recall, the chip did have a few kbytes of data cache, and it was possible to turn the cache on
and set it up from my C code such that it would serve as RAM.? But that wasn't really needed.

I've seldom felt a need write assembly code on any machine I've touched since about 1980
when C became widely available.
Well optimized C code is nearly as efficient with regard to speed and code size
(assuming a machine word size of at least 16 bits),? and a heck of a lot easier to read in 6 months.

Jerry,? KE7ER


Re: polling vs interrupts

 

开云体育

Allison,
?
I started working with minis in 1969. In 1971 I went back to school and learned assembly on an IBM 360.
?
But my early days were mostly with a DG Nova.
?
In 1973 I designed what became the standard Centroics interface used in CP/M and later MS DOS.
?
I spent many years in the disk drive industry doing firmware. Mostly Intel, Zilog, and Motorola. But a few otheres too.
?
In the mid 80's most PCs were 16K ot less. More memoy was too expensive. The 360 I worked on only had 240KB of memory.
?
I did assembly on PCs until 1998. C was not really good for real time stuff.
?
15 years ago I was working with PIC16 and PIC18 chips when I stumbled into the ATmega8 chips. I never looked back.
?
To operate? a DDS, LCD, and encoder the ATmega328 is just fine. I wrote a kind of BIOS for it to do the normal I/O operations like was done in CP/M. That makes writing application code eaiser.
?
When I started about 2005 there was no ICE for the ATmega8 family. So I developed an In-System-Debugger similar to th eone Intel had for the 8096.
?
I can't use the Arduino IDE and I consider most of the code I have seen written for it to be junk.
?
I use what they now call Atmel Studio. I have used it for some C programs but I prefer assembly.
?
I consider the Arduino boards too small to do anything useful with. I use Vector Proto boards and wire-wrap.
?
My next project is a LCR meter using an Atmega644 and a AD5933. I have about 80% of the parts and will get most of the rest next month.
?
On my radio stuff the USB serial port is opticly isolated from the radio.
?
---
New Outlook Express and Windows Live Mail replacement - get it here:
?
?
Bob Macklin
K5MYJ
Seattle, Wa.
"Real Radios Glow in the DARK"

----- Original Message -----
From: ajparent1/KB1GMX <kb1gmx@...>
Reply-To: <[email protected]>
Sent: 11/27/2019 4:43:23 PM
Subject: Re: [QRPLabs] polling vs interrupts

Bob,

We both have similar origins. Started with sequential logic and state machine in the 60s,
I was learning then.? First micro was 8008 here to and 8080, Z80, 6800, 6502, 1802, TI9900,
and all of the 8048/9, 8051, managed to avoid higher than 8086.? ?I tend to think in Z80 or
PDP-8 depending on mood.? PIC16/18/24 and Arduino are fairly recent for the IDE as
prior it was assembly?via MPlab since 2004.? ?Arduino its nice, handy, cheap but the
libraries are painfully large.? I think the worst is the SD, I had to write my own to access
the device as bare blocks.? I got tired of people telling me that SD/uSD can only be
FAT, so no not required.

Prior to micros were the PDP-8i and PDP10, was a DEC fan and even worked there for a
decade before the fold.

C back then was K&R, I got to talk to K fairly often as I used to call on Bell Labs back then.
In the early 80s BASIC and the early version of QB was popular, I still have the QB4 kit
likely the best Basic before visual.? Then C was considered "esoteric" and too big but PCs
with more than 640Kb was not yet the rule.? It would take a 386 and money to crack the
1mb space in the very late 80s.

I was running Pascal (UCSD) and SmallC (basically K&R) in 1979 when they more or less hit
the streets.? ?Still have the NothStar Horizon crate I used for them.? PC C was late but the
first version was SmallC then Avocet, Hitech-C and Nevada C.? ?No biggy I had PDP-11
and VAX [Unix V6 and 7, RT-11, RSX11, VMS] so PC were S100 and SBC CP/M
machines till the 90s.? I truly felt PCs are mostly computing step backward till networking?
and NT3.51 and NT4? that was a short window as back to Linux.? So I largely skipped
the 8088/880286 era as a Z180 at 12mhz and later a Z280 with 8mb had more apps
and could do most of the same things.? ?It was late CGA and VGA that made the
PC as then?graphics were better.? If you don't need pictures then instantly is
a measure that's hard to appreciate.? ?I can reach over and boot a real CP/M
machine, AmproLB+, Z80/4mhz,? 45MB SCSI drive and floppies or the Kaypro 4/84
with 1mb ramdisk and all the goodies.? ?

Big thing is my archive of electronics? docs and programs, the back up that is on three
systems one air gapped (No net connection for safety) as the bulk size is 137GB.?
So why invent new when copy old is an option.? A part of that is the release version
of the Unofficial CP/M archive back when Tim and I put that together (1996ish) and
on the net as it was.? I'm really glad that Gaby was willing take up the helm for that
and keep it alive.??

So yes I remember the days when a MPU have in the range of 1-4kb of eprom
and 128 bytes of ram on board were it.? Use C, your kidding.

Allison
--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.


Re: #qcx CAT control #qcx

 

I'm one to appreciate what big and small are.? Save for VAX and PDP-11 with MMU
most of the MPUs I used were cramped on a good day.? Like 8049, you get 2k inside
any more than that and your a multi chip system and you hit that wall at 4K with
only 12bit address space so bank switching the upper 2k...? talk about ugly.

So 32KB (more like 16Kwords) is to me a lot of space compared to that.
But I'm still appalled with the IDE as even a simple program like blink
can suck down almost 1k of space.
--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.


Re: polling vs interrupts

 

Jack,

The sprintf() in z80 asm is a monster too? (about 12bytes) but not 2k, it calls format()
which is nearly 1k bytes if you include its dependent calls. Most of its just not needed.

However there are so many callable simpler lib functions in there for the Z80 programmer.
I've seen similar with the Arduino Library.

I have a?putstr() that will output strings and the cost is much lower.? Its enough
that with smaller functions for conversion I can do formatted output without the bloat.
Build the string in ram then print it, basic pointer handling and small.

--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.


Re: polling vs interrupts

 

Bob,

We both have similar origins. Started with sequential logic and state machine in the 60s,
I was learning then.? First micro was 8008 here to and 8080, Z80, 6800, 6502, 1802, TI9900,
and all of the 8048/9, 8051, managed to avoid higher than 8086.? ?I tend to think in Z80 or
PDP-8 depending on mood.? PIC16/18/24 and Arduino are fairly recent for the IDE as
prior it was assembly?via MPlab since 2004.? ?Arduino its nice, handy, cheap but the
libraries are painfully large.? I think the worst is the SD, I had to write my own to access
the device as bare blocks.? I got tired of people telling me that SD/uSD can only be
FAT, so no not required.

Prior to micros were the PDP-8i and PDP10, was a DEC fan and even worked there for a
decade before the fold.

C back then was K&R, I got to talk to K fairly often as I used to call on Bell Labs back then.
In the early 80s BASIC and the early version of QB was popular, I still have the QB4 kit
likely the best Basic before visual.? Then C was considered "esoteric" and too big but PCs
with more than 640Kb was not yet the rule.? It would take a 386 and money to crack the
1mb space in the very late 80s.

I was running Pascal (UCSD) and SmallC (basically K&R) in 1979 when they more or less hit
the streets.? ?Still have the NothStar Horizon crate I used for them.? PC C was late but the
first version was SmallC then Avocet, Hitech-C and Nevada C.? ?No biggy I had PDP-11
and VAX [Unix V6 and 7, RT-11, RSX11, VMS] so PC were S100 and SBC CP/M
machines till the 90s.? I truly felt PCs are mostly computing step backward till networking?
and NT3.51 and NT4? that was a short window as back to Linux.? So I largely skipped
the 8088/880286 era as a Z180 at 12mhz and later a Z280 with 8mb had more apps
and could do most of the same things.? ?It was late CGA and VGA that made the
PC as then?graphics were better.? If you don't need pictures then instantly is
a measure that's hard to appreciate.? ?I can reach over and boot a real CP/M
machine, AmproLB+, Z80/4mhz,? 45MB SCSI drive and floppies or the Kaypro 4/84
with 1mb ramdisk and all the goodies.? ?

Big thing is my archive of electronics? docs and programs, the back up that is on three
systems one air gapped (No net connection for safety) as the bulk size is 137GB.?
So why invent new when copy old is an option.? A part of that is the release version
of the Unofficial CP/M archive back when Tim and I put that together (1996ish) and
on the net as it was.? I'm really glad that Gaby was willing take up the helm for that
and keep it alive.??

So yes I remember the days when a MPU have in the range of 1-4kb of eprom
and 128 bytes of ram on board were it.? Use C, your kidding.

Allison
--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.


Re: #qcx CAT control #qcx

 

开云体育

I meant MAXED OUT on CODE memory.
?
You could move up to an ATMega644 or ATmega1284 but it's a phyically larger chip. And it does have more I/O pins.
?
BUT IT IS CODE COMPATIBLE with the ATmega328!
?
Bob Macklin
K5MYJ
Seattle, Wa.
"Real Radios Glow in the DARK"
?
---
New Outlook Express and Windows Live Mail replacement - get it here:
?
?

----- Original Message -----
From: Hans Summers <hans.summers@...>
Reply-To: <[email protected]>
Sent: 11/27/2019 9:51:56 AM
Subject: Re: [QRPLabs] #qcx CAT control

Hi Joe: I've done a lot of assembler and no doubt, it makes for more compact code than C. But the difference is not enough to justify the slower development time, in my opinion, for this application!?

Hi Bob: depends what you mean by MAXED OUT... I haven't measured the average CPU utilization but it is expected to be around 38%. Nowhere near maxed out. There's also plenty of spare RAM, and plenty of EEPROM for storing all the QCX settings. It's only the Flash memory?(program memory) that is full!?

Hi Jack: Yes, I was even down to 0 bytes spare at one point... but I went through several rounds of trimming, to make things?more compact. And my algorithm for compressing the menu text and logic. Now there are 100 bytes spare!?

In all my time working with the AVR microcontrollers I've never run out of EEPROM, and never run out of RAM. I always run out of Flash (for program space) and hardwarewise, run out of I/O pins, so many end up sharing! The ATmega328 is already the big brother of the DIP ATmega lineup, which has ATmega48, 88, 168 and 328 (with 4K, 8K, 16K and 32K Flash respectively) in the same pinout. Early Ultimate kit firmware used the ATmega168 and then at some point it was changed to ATmega328 to get more program space.?

73 Hans G0UPL

On Wed, Nov 27, 2019 at 7:38 PM Joe Street <racingtheclouds@...> wrote:
Thanks for taking the time to explain your approach Hans, and as someone pointed out you are doing a fantastic job which is much appreciated by everyone.? Please note, my comment wasn't in any way a criticism, only a reflection about how I have handled I/O versus other program functions in the kind of embedded coding I have done with my own projects which have all been PIC assembler based.

Joe

On Wed, Nov 27, 2019 at 10:06 AM Hans Summers <hans.summers@...> wrote:

Hi Joe
?
Yes and similarly the LCD should be updated one character at a time via interrupt and when you reach the end of the display buffer, you start over. Subroutines can update the display buffer asynchronously whenever they have data. At least that's how I would approach it.

This is how you would approach it yes, if you did not have a Flash memory limitation. When you have as much space as you like, you can do things elegantly and perfectly. When resources are more limited, it is necessary to optimize by selectively cutting corners. The hard part is knowing which corners are OK to cut, and which are not. But cutting some corners IS essential - the alternative is a larger, more expensive processor; or, less functionality. In either case the Performance+Features to Cost ratio decreases. Which means a less valuable product for everyone to enjoy.?

If the "perfect" way of doing it is functionally indistinguishable from the selective-short-cuts way of doing it, such that you would even NEVER KNOW how I implemented it internally, if I had not decided to answer your question on this topic - then it is not worth sacrificing Performance+Features to Cost ratio for zero benefit!?

Part of the reason why the Ultimate3S and QCX programs have always occupied nearly 100% of Flash resources, is that I initially tend to write the code in a modular, clean, elegant way that is easily maintainable, portable, easily enhanced etc. As more functionality gets crammed in I go back over areas of the code and find ways to make it take up less space. Sometimes that means making it less clean, but functionally equivalent.?

As a hypothetical example, consider the interrupt which occurs when the serial data has received a byte from the serial port. This interrupt handler sits in the serial data module. The interrupt handler calls another function, which is in the CAT module, which adds the incoming character to the circular buffer. Then the polling function notices the data in the incoming CAT command buffer and processes it, when it has time (at a lower priority).?

This is how I would write it if I had tons of space. It is very clean and elegant, text book development structured. BUT, that CAT circular buffer addition is called only once, from the serial data USART interrupt event handler. That act of calling the function wastes some program bytes, because it has to put the return address and variables passed onto the stack, and perhaps other things too. So, instead, I put the serial data interrupt event handler in the CAT module and make it directly add the characters to the circular buffer. Avoiding that unnecessary function call, saves some program bytes.?

There are often perfectly clean, modular, textbook ways of writing code that are easy to follow, and so neat they sparkle. But if one function calls one function and nobody else calls it, then that's an unnecessary function call that has taken space. Similarly, sometimes you prefer to use global variables (according to the text book, you should not be using global variables, they are dangerous!), because having an often-used variable accessible globally, avoids having to pass it through function calls. It compacts the program!?

Often making the code take as little space as possible involves knowledge of how the processor operates at low-level, and how the C compiler converts C source code into machine code; other times trial-and-error is required, to look at the compiled hex size and what changes help minimize it.?

These are engineering sacrifices that must be made to optimize a product. The same applies in hardware as well as in software.?

73 Hans G0UPL


Re: polling vs interrupts

 

开云体育

With the execption of 32 bit math the ATmeag8 chips are easy chips to program in assembly language.
?
I've been programming in assembly language sinnce 1970. My first micro was the 8008. I worked for Intel's first 8080 OEM customer in 1983/1985. Our group was the first one to license CP/M. I worked on CP/M until PC DOS/MD DOS in 1982,
?
Prior to the mid 80's we did not have C for use on a PC. I still have a set of diskd for MS C++ Ver 7 from 1989, Prior to windows.
?
Bob Macklin
K5MYJ
Seattle, Wa.
"Real Radios Glow in the DARK"
?
---
New Outlook Express and Windows Live Mail replacement - get it here:
?
?

----- Original Message -----
From: jjpurdum via Groups.Io <jjpurdum@...>
Reply-To: <[email protected]>
Sent: 11/27/2019 10:24:47 AM
Subject: Re: [QRPLabs] polling vs interrupts

Plus it's possible to try to use a processor that is ill-suited to the task on hand. Also, some people don't realize that some library functions use their own interrupts (e.g., Serial.print()) which can block incoming interrupts (i.e., a blocking call). I see code with print statements in ISR's all the time. For the type of coding I do, latency hasn't been a problem. It is, however, worthwhile learning about new processors that can run in the Arduino IDE (e.g., the STM32's, ESP32, and the Teensy's). After all, if the only tool on your belt is a hammer, it shouldn't be surprising that all your problems look like a nail.

Jack, W8TEE

On Wednesday, November 27, 2019, 1:13:48 PM EST, ajparent1/KB1GMX <kb1gmx@...> wrote:


Even interrupts have latency.? The reality of finite processor speed and task priority
and task overhead are real things to be taking into account.? Typical system with
interrupts have multiple events to be serviced some have priority.? Any one of
those takes the application into another dimension.

Allison
--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.


Re: polling vs interrupts

 

I think the worst offender in the Arduino library is sprintf(). Almost 2K to print a string! Talk about an h-bomb to kill an ant.

Jack, W8TEE

On Wednesday, November 27, 2019, 4:48:14 PM EST, ajparent1/KB1GMX <kb1gmx@...> wrote:


Jack,

Nails, roger that!

I have programmed on PDP-8, through Alpha for DEC hardware and embdeed work on all the 80x parts
and a few most never see.? Often the choice is availability and price, or management driven.

With care most do the job.??

As to printf() [and fat freinds],? its bloat that gets over used as it is rare that formatting is used.
The other abuse is getstr(), for yes or no [y,n].




--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.


Re: #qcx CAT control #qcx

 

Hi Hans:

Oh, I know you're not ignorant nor a hacker. I'm like you; self-taught in programming (my Ph.D. is in economics) and I have never been dogmatic about programming. I am amazed what you've manage to fit into a 328 and you do what ya gotta do to get the job done. Like I said, when pushed to the wall, I, too, do what's necessary and some of it's pretty ugly.

I've eaten enough of your time...back to the QSX!

Jack, W8TEE

On Wednesday, November 27, 2019, 2:21:28 PM EST, Hans Summers <hans.summers@...> wrote:


Hi Jack

Hah! You are a purist!? :-D? ?Yes, all of that you mention, is all excellent programming practice. And all eats memory too! I do make extensive use of PROGMEM, it saves me a huge amount of space. Tons of global variables everywhere?too. Without these two abuses (and some more), I could never have fit in half the functionality of QCX (or Ultimate3S). The other QRP Labs kits are not close to being out of space.?

Don't get me wrong. I am neither ignorant nor a hacker. Despite no formal education in computer science (my university education is physics) I spent 22 years professionally in IT until 2016, which was more than enough to understand why clean well-structured programming is so important. But in some scenarios, such as this one, where you want to pack a lot on... ya gotta be prepared to be a bit flexible!?

73 Hans G0UPL?
?


On Wed, Nov 27, 2019 at 9:35 PM jjpurdum via Groups.Io <jjpurdum=[email protected]> wrote:
I do tend to subdivide my code a lot, which means I probably have more function calls than most. As a result, I'm probably using the stack a lot more than I need to. While I avoid recursive calls, there is "non-executing" overhead associated with each function call and that's probably where I get into trouble. Also, in my attempt to enforce OOP encapsulation, I do a lot of parameter passing instead of using globals, too...probably another causes of over-stacking. Finally, for some reason I avoid some IDE structures (e.g., PROGMEM) that I consider programming hacks, which means I double-allocate some variables. (If I'm really up against the wall, I'll prostitute myself and use PROMEM!)

Jack, W8TEE

On Wednesday, November 27, 2019, 1:18:07 PM EST, Hans Summers <hans.summers@...> wrote:


Hello Jack
?
I usually run out of SRAM before flash memory. I remember on project where I was around 50% utilization of flash and 72% of SRAM and had a stack collision during execution! Moving to the STM32 and the Teensy T4 sure makes things easier in most cases.

I know, that's why I mentioned it... I have heard you say before somewhere (I forget where), you usually run out of SRAM first. That's strange that I always run out of Flash first!?

73 Hans G0UPL


Re: polling vs interrupts

 

Jack,

Nails, roger that!

I have programmed on PDP-8, through Alpha for DEC hardware and embdeed work on all the 80x parts
and a few most never see.? Often the choice is availability and price, or management driven.

With care most do the job.??

As to printf() [and fat freinds],? its bloat that gets over used as it is rare that formatting is used.
The other abuse is getstr(), for yes or no [y,n].




--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.


Re: polling vs interrupts

 

Jack,

We had a 'printk()' function we wrote that we could use to dump short serial sentences out a port, if necessary from within kernel mode.? We wrote it to be very lightweight (NO floating point!), so invoking it didn't add tons of code to the image.

Nice to have some tools in the box so you can see what's going on in your code.

73,

-- Dave, N8SBE

-------- Original Message --------
Subject: Re: [QRPLabs] polling vs interrupts
From: "jjpurdum via " <jjpurdum@...>
Date: Wed, November 27, 2019 1:24 pm
To: <[email protected]>

Plus it's possible to try to use a processor that is ill-suited to the task on hand. Also, some people don't realize that some library functions use their own interrupts (e.g., Serial.print()) which can block incoming interrupts (i.e., a blocking call). I see code with print statements in ISR's all the time. For the type of coding I do, latency hasn't been a problem. It is, however, worthwhile learning about new processors that can run in the Arduino IDE (e.g., the STM32's, ESP32, and the Teensy's). After all, if the only tool on your belt is a hammer, it shouldn't be surprising that all your problems look like a nail.

Jack, W8TEE

On Wednesday, November 27, 2019, 1:13:48 PM EST, ajparent1/KB1GMX <kb1gmx@...> wrote:


Even interrupts have latency.? The reality of finite processor speed and task priority
and task overhead are real things to be taking into account.? Typical system with
interrupts have multiple events to be serviced some have priority.? Any one of
those takes the application into another dimension.

Allison
--
Please reply on list so we can share.
Off list email goes to trash, I had to due to scrapers.


Re: #qcx CAT control #qcx

 

Hans,

Wonder if you've looked into Rate Monotonic Analysis/Scheduling?

If you know the worst case execution time of all your interrupt processes and the max repetition rate, you can:

a) assign the static interrupt priority to the highest rate (and follow with the others in descending order)

b) and formally prove that you have enough CPU time to guarantee that you won't miss a deadline.? You will end up with a processor load %, which must be less than X to work.

Note that if you meet the analysis, you are guaranteed to not fail deadlines, but it is NOT a guarantee of finding the most efficient solution!

Note that RMA does not consider assigning the highest priority interrupt to the most important process (which is a common mistake), but rather to the one that has the highest rate.

I've used this analysis successfully in the past to set up the interrupt structure for a machine vision system, where we were handling horizontal video line interrupts at 4x the line rate (known as ribbons) at greater than 60 kHz rate, and vertical video interrupts at 60 Hz field (not 30 Hz interlaced frame) rate.? For each ribbon interrupt, we had to dump a byte-deep pixel buffer into a SIMD array (eight 128-bit-wide South shifts into the array) and re-arm the ribbon buffer.? There was a short hardware FIFO on the input to the buffer, to allow us to stall the buffer while we shifted the video pixels into the SIMD array.? This was done 4x times each horizontal video line, and the total stall time could not exceed the horizontal retrace time, or we would have fallen behind the line/field rate.

This was all done back in the early 90's on a 25 MHz processor clock rate on an old i960 C-core 32-bit super-scalar RISC processor (which was considered pretty hot stuff in those days of 486DX2 processors).? We programmed everything in C, including the interrupts, and used the compiler flags to produce very efficient code (2-clock loops, for instance).

Hard real-time, that was.? Ran the vision on a 20-wire-bond/second wire bonder, and ran 24/7/365 wire bonding Pentium processors on the Intel line.

So, I'm a believer in RMA.

73,

-- Dave, N8SBE

-------- Original Message --------
Subject: Re: [QRPLabs] #qcx CAT control
From: "Hans Summers" <hans.summers@...>
Date: Wed, November 27, 2019 2:20 pm
To: [email protected]

Hi Jack

Hah! You are a purist!? :-D? ?Yes, all of that you mention, is all excellent programming practice. And all eats memory too! I do make extensive use of PROGMEM, it saves me a huge amount of space. Tons of global variables everywhere?too. Without these two abuses (and some more), I could never have fit in half the functionality of QCX (or Ultimate3S). The other QRP Labs kits are not close to being out of space.?

Don't get me wrong. I am neither ignorant nor a hacker. Despite no formal education in computer science (my university education is physics) I spent 22 years professionally in IT until 2016, which was more than enough to understand why clean well-structured programming is so important. But in some scenarios, such as this one, where you want to pack a lot on... ya gotta be prepared to be a bit flexible!?

73 Hans G0UPL?
?

On Wed, Nov 27, 2019 at 9:35 PM jjpurdum via <jjpurdum=[email protected]> wrote:
I do tend to subdivide my code a lot, which means I probably have more function calls than most. As a result, I'm probably using the stack a lot more than I need to. While I avoid recursive calls, there is "non-executing" overhead associated with each function call and that's probably where I get into trouble. Also, in my attempt to enforce OOP encapsulation, I do a lot of parameter passing instead of using globals, too...probably another causes of over-stacking. Finally, for some reason I avoid some IDE structures (e.g., PROGMEM) that I consider programming hacks, which means I double-allocate some variables. (If I'm really up against the wall, I'll prostitute myself and use PROMEM!)

Jack, W8TEE

On Wednesday, November 27, 2019, 1:18:07 PM EST, Hans Summers <hans.summers@...> wrote:


Hello Jack
?
I usually run out of SRAM before flash memory. I remember on project where I was around 50% utilization of flash and 72% of SRAM and had a stack collision during execution! Moving to the STM32 and the Teensy T4 sure makes things easier in most cases.

I know, that's why I mentioned it... I have heard you say before somewhere (I forget where), you usually run out of SRAM first. That's strange that I always run out of Flash first!?

73 Hans G0UPL


Re: #qcx CAT control #qcx

 

Hi Jack

Hah! You are a purist!? :-D? ?Yes, all of that you mention, is all excellent programming practice. And all eats memory too! I do make extensive use of PROGMEM, it saves me a huge amount of space. Tons of global variables everywhere?too. Without these two abuses (and some more), I could never have fit in half the functionality of QCX (or Ultimate3S). The other QRP Labs kits are not close to being out of space.?

Don't get me wrong. I am neither ignorant nor a hacker. Despite no formal education in computer science (my university education is physics) I spent 22 years professionally in IT until 2016, which was more than enough to understand why clean well-structured programming is so important. But in some scenarios, such as this one, where you want to pack a lot on... ya gotta be prepared to be a bit flexible!?

73 Hans G0UPL?
?


On Wed, Nov 27, 2019 at 9:35 PM jjpurdum via Groups.Io <jjpurdum=[email protected]> wrote:
I do tend to subdivide my code a lot, which means I probably have more function calls than most. As a result, I'm probably using the stack a lot more than I need to. While I avoid recursive calls, there is "non-executing" overhead associated with each function call and that's probably where I get into trouble. Also, in my attempt to enforce OOP encapsulation, I do a lot of parameter passing instead of using globals, too...probably another causes of over-stacking. Finally, for some reason I avoid some IDE structures (e.g., PROGMEM) that I consider programming hacks, which means I double-allocate some variables. (If I'm really up against the wall, I'll prostitute myself and use PROMEM!)

Jack, W8TEE

On Wednesday, November 27, 2019, 1:18:07 PM EST, Hans Summers <hans.summers@...> wrote:


Hello Jack
?
I usually run out of SRAM before flash memory. I remember on project where I was around 50% utilization of flash and 72% of SRAM and had a stack collision during execution! Moving to the STM32 and the Teensy T4 sure makes things easier in most cases.

I know, that's why I mentioned it... I have heard you say before somewhere (I forget where), you usually run out of SRAM first. That's strange that I always run out of Flash first!?

73 Hans G0UPL


Re: BPF alignment

Bill Lawless
 

Update to the group,

I focused on the voltage issue I was having and found a bad solder joint in the vicinity of R1 and R2. I am not sure which one did the trick but as soon as I powered up a lot of things were solved. Voltages at the ICs were more like what they should be also the BFP was at 6 and was able to adjust to 8, no better. I have a receiver now and like the sound of other stations on 17.

I have more test to do. Its a good way to get familiar with the radio.

73,

Bill Lawless - W5WRL

On Nov 27, 2019, at 12:21 AM, Alan G4ZFQ <alan4alan@...> wrote:

voltages on IC5 do not match the chart.
Bill,

These voltages are derived from the divider R1/R2.
Most likely is a bad joint on R1.
Or a short across R2.

73 Alan G4ZFQ