8022??? - Page 1
Forum section: electronics / general

author: Analog Kid
author_rank: Super Contributor
timestamp: September 14, 2025, 12:19:34 am
content: I'm asking this as somewhat of a n00b in the field (I've programmed the SX-28 and that's it).Browsing throughThe Art of ElectronicsI came across their description of the Intel 8022. Now, this is an ancient microprocessor, but it looks intriguing to me: on-board ADC, memory and 8 comparators. Looks like a fun toy to play around with.Questions: is this chip available anywhere? It came out in 1976, and from what I read was second-sourced by Intel (forget to who exactly).Is there a datasheet available? One site I came across said they couldn't find one.And no, damnit, donottell me to "just Google it"! Goddamnit; life's too short for that. That's why I'm intentionally asking here, to see if anyone actually knows about this.If the answers the the questions are "no" then I'll look elsewhere.In that case: are there any modren microprocessors that have on-board ADCs that I might look at? PICs? I'm guessing there are probably at least a few; my preference would be something easy to set up and program (I prefer to code in assembly language, BTW).Speed is not of the essence here. A generous amount of RAM would be nice, though.Thanks in advance for any helpful replies.

author: kite31
author_rank: Regular Contributor
timestamp: September 14, 2025, 12:26:04 am
content: Mouser it? Plenty of microcontrollers with inbuilt ADC if that is what you seek.I see that you can buy 10 x 8022 on ebay for US$18.

author: cfbsoftware
author_rank: Regular Contributor
timestamp: September 14, 2025, 12:49:55 am
content: Quotehttps://bitsavers.org/components/intel/8048/9800270D_MCS-48_Family_Users_Manual_Jul78.pdf

author: Analog Kid
author_rank: Super Contributor
timestamp: September 14, 2025, 02:03:43 am
content: Thanks for answers so far.I've decided against this chip.NoSUBinstructionCan't access all 2K of program ROM without bank-switching (ugh!)I kinda hate to ask this here since it's such a general question, but because there are so many μprocessors out there, I wonder if people can help me narrow down my choices a little bit. I'm thinking of:Any of 8/16/32-bit chips; 8 bits would be fine, any more is icing on the cakeGenerous amount of program ROM (8-16KB)Easy programming via USBEmbedded ADCReal-time clock/counterAvailable assembler & linkerThrough-hole chip preferredThat ought to bring the count down to about, what? 100 or so?Or if there are any online resources that could help a guy narrow down his μP choices ...

author: granzeier
author_rank: Regular Contributor
timestamp: September 14, 2025, 09:54:13 am
content: Are you a beginner to programming? If so, BASIC would be a good introduction. Check out the Raspberry Pi Pico (with, or without, the W - WiFi). Load PicoMite BASIC (https://geoffg.net/picomite.html) onto it, and for less than $10 (including a small breadboard) you have a nice easy prototyping board. This BASIC is a very full-featured, modern language, and yet is still simple to learn.

author: rhodges
author_rank: Frequent Contributor
timestamp: September 14, 2025, 03:30:35 pm
content: A few years ago, I was into the STM8 microcontroller. It is cheap and easy to program with the ST-LINK USB device. Compile and link with SDCC.You can browse my libraries and test/demo code here:https://github.com/unfrozen

author: Kleinstein
author_rank: Super Contributor
timestamp: September 14, 2025, 06:58:20 pm
content: Wanting THT and programming via USB gives some limitations and one may end up more with modules and not a bare µC.The Rasbery Pico is definitely a candidate. There are different programming options, especially C and some micro Phython. Internally it is a dual ARM µC - so quite powerfull. ASM programming can be a bit complicated with the ARM thumb code.There is one slight catch: the ADC is nominal 12 Bit, but due to a bug there are quite some errors that gives some 8 glitches in the response and 9 bit chunks that work OK between the glitches. So the ADC performance is somewaht limited.Like with most µCs it needs some time to get used to a family and the tools. Many µCs need some kind of programmer as programming is usually via a kind of SPI or similar JTAG interface.

author: Analog Kid
author_rank: Super Contributor
timestamp: September 14, 2025, 08:28:51 pm
content: Quote from: granzeier on September 14, 2025, 09:54:13 amGo back and read what I wrote.I'm a long-time assembly-language programmer.(BASIC was actually the first language I ever used, back in the 19-ought-80s.)I prefer assembly over C.

author: Ian.M
author_rank: Super Contributor
timestamp: September 14, 2025, 09:25:55 pm
content: Maybe buy an Arduino Uno R3 or Arduino Nano if you want a DIL footprint board (or clones*) and download Atmel Studio from Microchip's archive, and learn to program 8 bit AVRs in assembly on its ATmega328P, using the Arduino bootloader + AVRDUDE to program it over the board's USB serial port.* Most far east Arduino clones come with a fake ATmega328P containing an Aries die, but its near 100% compatible except for higher sleep current.

author: Analog Kid
author_rank: Super Contributor
timestamp: September 14, 2025, 09:39:21 pm
content: Quote from: Ian.M on September 14, 2025, 09:25:55 pmUm, thanks, but no thanks.No ADC, for one thing. Also only 1K of EEPROM, so not much program space. Docs say it has "6 analog inputs" but those are just comparators, right?If someone's going to bother to reply here, could you please try to suggest chips that fit my requirements? They are:2K (or preferably more) of program spaceBuilt-in ADCUSB programmableAssembler/linker available (not too concerned about an IDE here)

author: Kleinstein
author_rank: Super Contributor
timestamp: September 14, 2025, 09:53:38 pm
content: The AVR based Arduinos have a limited EEPROM, but this is extra memory for data with more possible write cycles. The program flash memory is usually 8 K for the old ones and 32 Kbytes for the newe ones (ATmega328). A little (like 1 or 2 K) may be occupied by the bootloader. They also have an ADC (10 bit), not just a comparator.The only point may be getting a version with a bootloader already programmed. Other wise one may need an extra ISP programmer to do the programming via USB. There are quite some versions around - there were some using some USB to UART modules with specific chips. I don't know if this is still a viable option.The AVRstudio IDE includes a very nice simulator that can be quite handy for learing assember usage and timing details. Simulation of the ADC is however naturally limited.

author: Ian.M
author_rank: Super Contributor
timestamp: September 14, 2025, 09:55:53 pm
content: Quote from: Analog Kid on September 14, 2025, 09:39:21 pmWhy not RTFM (or at least the datasheet)!An ATmega328P has 32KB FLASH program memory, 1KB EEPROM, and 2KB RAM. It has 6 ADC inputs (8 in TQFP package), multiplexed to a single 10 bit ADC and also an analog comparator. Its not natively USB programmable, but if you get an Arduino the board has a USB <=> serial bridge and a serial bootloader preprogrammed in the MCU using 512 bytes of program memory. The board also gives you a 16MHz resonator (or crystal on some clones) , a 5V regulator, and a buffered LED on pin PB5.The only thing it doesn't have from your original requirements is an internal RTC.

author: themadhippy
author_rank: Super Contributor
timestamp: September 14, 2025, 10:11:50 pm
content: Quotei suggest you learn to read data sheets.Heres a link as you never seem to be able to search for anything yourselfhttps://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdfthe only thing missing fromQuoteis usb programing,and that can be easily achieved with a cheap ftdi board

author: Analog Kid
author_rank: Super Contributor
timestamp: September 14, 2025, 10:12:06 pm
content: Quote from: Ian.M on September 14, 2025, 09:55:53 pmSorry, that wasn't clear (to me) fromthe datasheet I looked at. Didn't realize that "flash" was program memory; I thought EEPROM was the total program memory space.32K program space is good. And the datasheet only mentions 6 "analog inputs" without explaining that these are ADC inputs. But that's good.I'm confused; the datasheet explains the USB programming facility, so isn't this a part of the UNO R3,. the board-level product? (I understand the microprocessor itself has no USB capability). So if I have the IDE I can just plug and play, right?An RTCC would be nice but I can do without it; can do timing based on the clock.

author: Ian.M
author_rank: Super Contributor
timestamp: September 14, 2025, 10:21:19 pm
content: No, the Atmel Studio IDE isn't quite plug and play, as you wont be using a supported Atmel (now Microchip) USB programmer. AVRdude is 3rd party open source software and has to be installed separately and manually configured in Atmel Studio 7.

author: Analog Kid
author_rank: Super Contributor
timestamp: September 14, 2025, 10:27:55 pm
content: Referring to the Arduino UNO R3 describedhere, it says "The following software tools allow you to program your board both online and offline":Arduino IDEArduino CLICloud EditorSo one of those should work, yes?(I know nothing about any of that software)

author: Ian.M
author_rank: Super Contributor
timestamp: September 14, 2025, 10:39:56 pm
content: Sure, if you want to program in the 'muntzed' GCC C++ the Arduino environment uses. However it does make it difficult for an assembler programmer who wants full control of the MCU. Installing the Arduino IDE is however a convenient way to get the GCC AVR toolchain + AVRDUDE installed.Coming from the Atmel studio direction, its fully integrated *IF* you are using an Atmel/Microchip supported devboard with on board USB programmer e.g.https://www.microchip.com/en-us/development-tool/ATMEGA328P-XMINIwhich also gets you in-circuit debugging.However if you are using Arduino boards for their low cost and universal availability, and because genuine Uno R3 and good clones have a socketed DIP ATmega328P you can swap into your application circuit, Atmel Studio doesn't know how to talk to them.

author: Analog Kid
author_rank: Super Contributor
timestamp: September 14, 2025, 11:03:49 pm
content: OK, thanks.So if a guy wanted to program this in assembly language, would that be possible through the IDE? (Asking about the ATmega328P Xplained Mini you linked to.) Or would I need to obtain my own assembler/linker?Other than that it seems pretty straightforward. Plug in the USB and program/debug.

author: Ian.M
author_rank: Super Contributor
timestamp: September 14, 2025, 11:28:13 pm
content: Atmel Studio has all the tools you need for AVR assembly language development bundled with it and integrated. Use the ATmega328P Xplained Mini board and you can expect programming and debugging from the IDE to 'just work'. Use a 3rd party board with a supported Microchip/Atmel UPDI capable debugger and provided the 3rd party board hasn't got a capacitor slowing down the Reset pin, it should also 'just work'. However general purpose Microchip/Atmel UPDI capable debuggers aren't cheap, so a lot of people use Arduinos or the USBasp programmer, which require AVRDUDE to talk to them, and cant debug.I originally got into AVR assembly language using Atmel Studio 4 and an Atmel STK500 board. That's probably a little too retro for you (vs Studio 7 and an Xplained board), as although the IDE is nice and lightweight, version 4 is a PITA to install correctly on Win10 or higher, and the STK500 requires a DE9 serial port (preferably two) on the PC. USB serial adapter compatibility can be a bit iffy. Also the STK500 isn't debug capable, and doesn't support newer AVRs

author: Analog Kid
author_rank: Super Contributor
timestamp: September 14, 2025, 11:41:53 pm
content: Still a little confused here.If I buythis board from DigiKey($15.47), does it come with the Atmel IDE? is that available as a free download, or do I have to buy it?If not, what kinds of hoops does one have to jump through to use a 3rd-party tool like Arduino's?What is AVRDUDE?I could live without a debugger, though it'd be really nice to have one.

author: Ian.M
author_rank: Super Contributor
timestamp: September 15, 2025, 12:06:16 am
content: The days of Microchip shipping a software CD with their hardware tools are long gone.All Microchip (and ex-Atmel) IDEs for MCUs are free downloads from microchip.com. Older IDEs include assemblers. The current MPLAB X doesn't. Their C compilers are free to download and have a usable and legal to use free mode (even commercially), but Microchip require you to have a paid licence to unlock full optimisation. Free mode would suffice if all you needed was the assembler.To use a 3rd party board, e.g an AVR based Arduino with Atmel Studio 7 you need to either configure AVRDUDE as an external tool to send your generated hex file to its bootloader, or use an Atmel/Microchip supported programmer/debugger connected to the board's ICSP header. Any capacitor on the reset line will need to be disabled/removed to use UPDI debugging.

author: cfbsoftware
author_rank: Regular Contributor
timestamp: September 15, 2025, 12:08:04 am
content: Quote from: Analog Kid on September 14, 2025, 02:03:43 amI tried submitting your requirements as an AI query and got this response:QuoteHowever, having had no experience with either I have no idea how accurate that response is.My recommendation to you is to buy aPiPico development boardand theRP2040 Assembly Language Programmingbook by Stephen Smith. It has a four page description of how to program the built-in RP2040 temperature sensor using ADC.

author: Ian.M
author_rank: Super Contributor
timestamp: September 15, 2025, 12:17:12 am
content: Nobody experienced here trusts 'AI' responses as the current LLM 'AI's are anything but intelligent. They arestochastic parrotsthat frequently hallucinate i.e. *LIE* ! Please dont use them here for anything more than checking your grammar if English isn't your first language, as all they do when asked a technical question is add noise to the discussion!If you want to search for a Microchip or Atmel MCU by hardware features and capabilities use Microchip MAPShttps://www.microchip.com/maps/microcontroller.aspxHowever its horribly slow to update so be patient and wait for the page reload after selecting each parameter or feature. Also there are known to be some errors in its database, so its only good for narrowing down your selection. You still need to read the actual datasheet and errata to confirm the features you need are present and usable before ordering parts!

author: Analog Kid
author_rank: Super Contributor
timestamp: September 15, 2025, 12:56:11 am
content: Quote from: cfbsoftware on September 15, 2025, 12:08:04 amOK, let's say a guy buys that dev board (say,this one from Sparkfunfor $5). What software does he need to program/run/debug this, and where does he get it?Not sure I'd need that book, assuming I can get a doc that explains the assembly language.

author: ledtester
author_rank: Super Contributor
timestamp: September 15, 2025, 02:03:41 am
content: I would peruse this document:https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdfIt goes through setting up the toolchain on Linux, Windows and MacOS.It also mentions the Raspberry Pi Debug Probe as a useful accessory:https://www.pishop.us/product/raspberry-pi-debug-probe/(you might be able to use another Pico or RPi computer for this)as well as this github repo of examples (in C):https://github.com/raspberrypi/pico-examplesDebugging is accomplished via gdb. You can get an idea of what using gdb is like from this page:https://learn.arm.com/learning-paths/embedded-and-microcontrollers/rpi_pico/debug/You might benefit from getting the book as it probably shows you exactly the steps you need to get your asm program assembled, linked and loaded into the pico as well as how to use the debugger - especially if you not familiar with the GNU toolchain.Update: I just looked up the book on Amazon and it appears to be oriented to using a Linux-based system as the development environment.

author: Analog Kid
author_rank: Super Contributor
timestamp: September 15, 2025, 03:49:40 am
content: I'm going to be programming this under Windows (7).I really don't want to use Visual Studio.So what are my choices here?The "getting started" doc mentioned other IDEs, Eclipse and CLion, but I know nothing about those.I was hoping this would be simple: install an IDE, fire it up and go.

author: Analog Kid
author_rank: Super Contributor
timestamp: September 15, 2025, 08:29:24 pm
content: I'm about ready to order this board, theRaspberry Pi Pico H.I've read through the "getting started" doc and I'm still not sure what software I'll need to use this under Windows.Can someone here enlighten me regarding that?Again, I'd really rather not use Visual Studio if I can avoid it.And I'll be programming this in assembly language, not C/C++.

author: ledtester
author_rank: Super Contributor
timestamp: September 16, 2025, 01:25:23 am
content: Quote from: Analog Kid on September 15, 2025, 03:49:40 amI would double check to see if the Pico toolchain will work under Win7. AI says it is not officially supported but says there are work-arounds.Also see this:https://github.com/raspberrypi/pico-feedback/issues/118

author: Analog Kid
author_rank: Super Contributor
timestamp: September 16, 2025, 01:50:29 am
content: OK, so assuming one can use the workarounds described on that page, I still need to know:Can I upload an assembly-language program to the micro using that software?What additional software, if any, would I need?I'm not about to buy the damn thing and then discover that I'll need to spend 5,000 hours getting the goddamn thing to work.Life's too fucking short for that. I need a sure-fire recipe that'll work here, otherwise, fuggedaboudit.

author: saipan59
author_rank: Contributor
timestamp: September 16, 2025, 02:23:20 pm
content: Another vendor option:I have built *dozens* of projects over the years with T.I. stuff (before that, I was all in to Microchip, in the pre-Atmel days). The other major vendors are pretty much the same, unless you have a VERY specific (unusual) requirement that drives you to a certain vendor (not likely!).Here are the steps:1) Buy an eval board, such as this one (there are a bunch of others, the higher performance such as the MSPM0 series parts are ARM core):https://www.ti.com/tool/MSP-EXP430F5529LPHere's the UG for the board:https://www.ti.com/lit/ug/slau533d/slau533d.pdf?ts=1758012030082.Or do this one, if you really want a through-hole part (limited functionality):https://www.ti.com/tool/MSP-EXP430G2ET2) Do a free download of "Code Composer Studio". It is Eclipse based (the same for Microchip and other vendors, I think). But you said "Windows 7" - check to make sure the IDE supports that.3) Move past your aversion to coding in C. With modern parts, only a very, very special situation justifies working in Assembly. In C, there are huge libraries of code to use, with examples of how to use all of the peripheral features.4) Plug the board into a USB port on you PC.Pete

author: saipan59
author_rank: Contributor
timestamp: September 16, 2025, 02:59:49 pm
content: >Do a free download of "Code Composer Studio". It is Eclipse based (the same for Microchip and other vendors, I think). But you said "Windows 7" - check to make sure the IDE supports that.FYI (just checked): For 64-bit Windows 7, I would use CCS V10 (many older versions are on the download page). For 32-bit Win7, you have to go earlier, but I didn't check how far back. Possibly V8(?).Pete

author: Analog Kid
author_rank: Super Contributor
timestamp: September 16, 2025, 06:48:37 pm
content: Quote from: saipan59 on September 16, 2025, 02:23:20 pmNo. Just no.And that's a hard no.I love this place: you get all the answers except the one to the specific question you asked.

author: ledtester
author_rank: Super Contributor
timestamp: September 16, 2025, 09:11:02 pm
content: For the RPi Pico, I would first try running this:https://www.raspberrypi.com/news/raspberry-pi-pico-windows-installer/and see if all of the examples compile. You can do this without a Pico.This video will give you an idea of what the development process will be like:How to Write ARM Assembly Language for the Raspberry Pi Picohttps://youtu.be/ZS_Cbmf3z-UAgain, you can try this without having a Pico.If that works for you, the only issue will be getting the Pico recognized by the Win7 USB subsystem, and that's where you might find some help in the Raspberry Pi forums, e.g.:https://forums.raspberrypi.com/viewtopic.php?t=300633

author: saipan59
author_rank: Contributor
timestamp: September 17, 2025, 01:00:42 am
content: Quote from: Analog Kid on September 16, 2025, 06:48:37 pmYou wrote in your initial post:>I'm asking this as somewhat of a n00b in the field (I've programmed the SX-28 and that's it).>...are there any modern microprocessors that have on-board ADCs that I might look at? PICs?Based on your own statements and questions, I suspect you don't understand the learning curve involved in going directly to assembly on a modern part. The SX28 is around 25 years old, and it is somewhat unique. Your experience with that won't help you a lot.You are apparently unfamiliar with what the modern chips do, and how they do it.Since you're unwilling to use C as you say, then you should start with one of the platforms that supports BASIC directly. Otherwise, you will struggle with every detail, and there are a LOT of details.Another approach to satisfy your 'assembly urges' could be to use one of the 'classic' vintage MPU chips, such as 6502, 6800-series, or perhaps 8085. Then assembly is completely practical and useful. The downside would be that you have buy or build a HW platform that has the memory and ADC and such that you want, a way to load code, etc. But you could do everything initially in an emulator...Meanwhile: I understand your attraction to assembly. But can I ask why you reject higher-level languages? Many years ago, folks would commonly use assembly to get the most "efficiency" (code space, and/or speed). But these days, in *almost every case*, a C compiler will make more efficient code than you or I can. And note that 'code space' is very often NOT a concern, like it was in the 70's and 80's.Pete

author: Analog Kid
author_rank: Super Contributor
timestamp: September 17, 2025, 01:23:45 am
content: Welll, all I can say is that for me, assembly language is a clear preference. I've written C, BASIC (a long time ago), and was once a paid (!) COBOL programmer.I'm quite adept at x86 assembler in particular; I write a lot of Win32 GUI programs using it. I realize there would be a learning curve to use ARM assembly, but really, how different can it be? Even SX-28 was a bit weird, especially the conditional jumps (which all merely skipped the next instruction if true), but i managed to pretty well master it. Besides, I think it would be fun to learn a new assembler. (And no, I'm not a masochist!)Using assembly language for me, BTW, has very little to do with performance, oddly enough (though it can be used to improve that metric if needed). I just like it, for some strange reason.My bad; when I said I was a "n00b in this field" I meant with regard to microprocessors like the Pico, etc. I've done plenty of x86 (desktop) programming.

author: saipan59
author_rank: Contributor
timestamp: September 17, 2025, 01:51:09 am
content: >Welll, all I can say is that for me, assembly language is a clear preference.OK then. So it appears that your main issue is in your unfamiliarity with what the modern chips are capable of, and the tool suites that go with them.So here's an offer of help:If you can 'outline' a typical project that you wanted to implement (a few sentences or bullet points), I could respond with a paragraph or so of how it can be achieved using the T.I. parts and tools [T.I. being the modern vendor I'm very familiar with, aside from the old 6800 and 6502]. Anything I describe based on T.I. would be nearly identical with other vendors, such as Microchip, Renesas, etc.Pete

author: Analog Kid
author_rank: Super Contributor
timestamp: September 17, 2025, 02:22:33 am
content: Welll, I'd like to be able to play with an inbuilt ADC, so I think that precludes those Jurassic processors. (My original question was about the 8022, but that seems to be a dead end, unfortunately.)Not that I wouldn't like to play with those ancient chips: ackshooly, I've wanted to try out the Z80 for a long time now.So if you'd like, maybe you could suggest what would be needed to use that micro. Typical applications would mostly involve timers (using a crystal oscillator timebase).But I'd like to get started with the Pico mentioned before, so it'd be really nice if someone could tell me definitively what software I'd need to use that under Windows 7 using assembly language.

author: saipan59
author_rank: Contributor
timestamp: September 17, 2025, 03:20:30 am
content: >I've wanted to try out the Z80 for a long time now.>So if you'd like, maybe you could suggest what would be needed to use that micro. Typical applications would mostly involve timers (using a crystal oscillator timebase).A Z80 is just a classic MPU. Basically ALL features beyond the core processor require separate chips: RAM, ROM, Timer, UART, GPIO -- all of those are 1 or more separate chips, plus some basic logic for things like memory addressing.So, unless you do it in emulation, you need to buy or build a HW platform (I'm sure folks sell kits and such), and then you need a way to load/burn code into it. I don't really know what's available that is ready-to-go.Over the years, when I experimented with 6502, 6800, or 6809, I built my own boards, and also built my own EEPROM-burner that talks to my PC via USB (the burner is based on a T.I. MSP430 eval board).As an example, last year I designed a 6809 board (with EEPROM, RAM, GPIO, etc.), and also a 'daughter board' that has a vintage ADC chip on it.Pico: I have no experience with it, but it's a ARM Cortex M0, which is much like some of the T.I. parts I use. At a glance at the Pico info online, the smart way to go is (I think) to create an empty C code project, then call an assembly function which does everything you care about. This is very smart, because the C startup will take care of certain essentials. It's the same with the T.I. parts that use an ARM core: a 100% assembly project is not so easy to create, but an empty C project is trivial, then calling assembler code is supported, all within the IDE.Conversely, with the MSP430-series parts, they support the very simple creation of a bare-bones assembly project *directly* in the IDE. Here's an example that I just made in a couple of minutes (I edited out whitespace and blank comment lines). All I did was tell the IDE to make me a "blank assembler project":; MSP430 Assembler Code Template for use with TI Code Composer Studio.cdecls C,LIST,"msp430.h" ; Include device header file.def RESET ; Export program entry-point to make it known to linker..text ; Assemble into program memory..retain ; Override ELF conditional linking and retain current section..retainrefs ; And retain any sections that have references to current section.RESET mov.w #__STACK_END,SP ; Initialize stackpointerStopWDT mov.w #WDTPW|WDTHOLD,&WDTCTL ; Stop watchdog timer; Main loop here; Stack Pointer definition.global __STACK_END.sect .stack; Interrupt Vectors.sect ".reset" ; MSP430 RESET Vector.short RESETPete

author: Nominal Animal
author_rank: Super Contributor
timestamp: September 17, 2025, 05:44:11 pm
content: Apologies for the long wall of text.Quote from: Analog Kid on September 14, 2025, 12:19:34 amI started with Atmel AVRs, specifically the ones with native USB 1.1 interface: AT90USB1286 and ATmega32U4 in particular. AVR assembly is easy, and you have plenty of registers (which is the main difference to x86 instruction sets). At that time, Atmel wasn't part of Microchip, so I usedavr-gccandavr-libc; these are an excellent starting point sinceavr-libcheader files describe the registers and itscrt(C runtime) files contain the assembly needed to initialize the microcontroller (including copying initialized variables from Flash to RAM), andavr-gcccontains an assembler (GNUasfor AVR). You can basically follow standardavr-gccprogramming procedures, but just feed assembly source.sfiles togcc.ARMv7e-m architecture (ARM Cortex-M0/M3/M4/M7) as used on many microcontrollers is not that different, really, except that one must understand that they have two instruction set modes: A32 (.armassembly directive), and T32 (.thumbassembly directive), T32/Thumb yielding much more compact code. Both can be used in the same assembly source file when the Unified Assembly Language is used (which is whatarm-gccand GNUasfor ARM use). When you understand that, you won't get confused looking at theARMv7-M architecture Reference Manualand the instruction sets' documentation.The problem with Cortex-M microcontrollers is that most have a relatively complex/large bootloader, not only handling the Flash-to-SRAM setup stuff, but also an option to load new firmware via USB (which many have as a built-in peripheral). One interesting exception is the Teensy 4.x series based on NXP i.MX RT1062 (512k+512k of RAM, runs at 600 MHz), as the proprietary bootloader chip (a separate preprogrammed microcontroller you can buy from pjrc.com also), because the separate bootloader chip handles new firmware uploads by copying the necessary firmware to RAM via JTAG, so your own firmware only needs to handle the bootup and runtime preparation stuff, which is open source code atPaul Stoffregen's github. I use these extensively as ad-hoc tools (because the USB interface can sustain 25+ Mbytes/sec to host, or from host to Teensy — over 200 Mbits/s — using standard USB serial drivers and simple code written in Arduino environment in C/C++) because of their sheer computing and I/O power and development simplicity. An assembly loop toggling specific output pins in the same bank can reach about 180 MHz frequency, if I recall correctly...Even though I've always programmed these mostly in C/C++, there are still places like low-latency interrupts with simple tasks, like updating a single variable, where assembly can make a big difference (for example, by using minimal registers). One can even tell GCC to not use specific registers at all (for AVR and ARMv7-M), so one can reserve those for use in the minimal-latency interrupts.My own preferred development toolchain is based on plainMakefiles(and GNUmake) and agcc- andbinutils-based toolchain. I do have written an occasionalGDB pluginfor examining memory structures easier (and there is a Teensy GDB proxy you can use to do that in real time), my bugs tend to nowadays be either trivial (off by ones, typos) or complicated interactions between different parts of the code, so I rarely use a debugger anymore. Even for the code editor, syntax highlighting tends to suffice, although for larger projects split over many files I will reach for an editor that can track C/C++ keywords across files.All that said, while I know all of the above works in Windows also, I haven't used Windows in a couple of decades, so cannot offer any detailed advice there. In particular, I'm not sure which exact installers to use. I do know that if you used a Teensy, installedArduino 2.3.0 or newer, and latestTeensyduino, you'd get a full tested working toolchain installed, that would work perfectly for purely assembly code also, when compiled using GCC (which simply calls its companionasassembler with all the correct command-line options).If you do tend towards Teensy 4.0 (which are designed byPJRC.combut manufactured nowadays bySparkfun), I do recommend you get two of them, or perhaps a 4.0 and a 4.1, with two 8 MB PSRAMs and the Ethernet Kit for the 4.1. They have the exact same core, just expose different peripherals, so if you encounter an oddity, you can verify it happens with the other one also and thus exclude hardware issues in one unit only.I prefer microcontrollers with native USB interfaces and not USB-to-Serial bridges (like on most Arduino boards), because my very first microcontroller project was an arcade plank (using AT90USB1286, Teensy 2.0++) with a proper arcade microswitch joystick and buttons, so I could play online Flash games. It had a 16-position absolute encoder connected to four input pins, so I could select the layout at run time. You see, most online games use keyboard keys for controls, so this one behaved as one, and the layout just selected between predefined sets. Because the USB interface is native, I could use USB HID protocol, and not need any drivers on any operating system, just plug it in and go. (Later on, when USB 3 came along, some USB 3 host chipsets have issues with USB 1.1 Full Speed devices, and need an USB 2.0 hub in between to work properly. This just in case you play with AVRs or other microcontrollers with USB 1.1 support: an USB 2.0 hub in between almost always solves the compatibility issues.)ATmega32U4 is still widely used for custom keyboard projects.Another microcontroller family you might have much fun with would be WCH CH32X033 and CH32X035 RISC-V (QingKe core), with native USB, working on either 5V or 3.3V supply (and corresponding CMOS logic), and only need a single supply decoupling cap, no crystal or anything (seethis OSHW CH32X035F7P6 example dev board). Several CH32X035 models have USB PD capability (see e.g.this OSHW CH32X035 USB PD tester), making it particularly interesting for USB-C PD powered projects. In Windows, you do need to install theCH372driver for WCH microcontrollers. There is anArduino CH32X035 corefor it, which includes everything needed to bring it up including the C runtime (crtfiles). I do believe the RISC-V instruction set itself is very well designed and nice to use, just haven't used it in assembly in enough anger yet to be absolutely certain.If you want to make your own boards at JLCPCB/PCBWay/others, I'd say CH32X035 are the way to go. These even have the bootloader in ROM, triggered by pulling UDP (USB+) to VCC when powering it, which allows uploading a new firmware with just a simple Python script; and the$8 WCH-LinkE from official WCH AliExpress storecan be used with the two-wire debug interface (SWCLK and SWDIO) for debugging and firmware uploads. Again, the toolchain would be based on GNU GCC, just with the RISC-V target this time. Feedgccwith assembly source files, and it will callaswith all the necessary command line options to build the binaries (in ELF object file format) correctly.

author: ledtester
author_rank: Super Contributor
timestamp: September 17, 2025, 10:28:51 pm
content: The Arduino boards (i.e. Uno, Nano, Mega) are very easy to get into with the Arduino IDE.According to AI, the latest version of the Arduino IDE which is compatible with Win7 is 1.8.19 - the final release of the 1.x series:https://forum.arduino.cc/t/need-arduino-ide-version-2-2-1-for-window-7-32-bit/1186697You can download 1.8.19 from the official Arduino web site (look for "Legacy IDE").https://www.arduino.cc/en/software/

author: SteveThackery
author_rank: Super Contributor
timestamp: September 20, 2025, 08:22:38 am
content: Quote from: Analog Kid on September 16, 2025, 06:48:37 pmYes, just yes. Provided you stay away from pointer arithmetic, 'C' is piss-easy to learn. In fact you claim to be familiar with it already. Your refusal to even consider it is irrational. Prejudice and irrational thinking has no place in the world of electronics, or indeed any other field of science and technology.The simplest solution to your initial request by far is Arduino. It ticks every box, especially in terms of a turnkey solution, which you appear to want. Download the Arduino IDE, plug in a Nano Every or Uno R3 with a USB cable, and that's it - you are up and running. And if only you would dump your anti-'C' prejudice you could get straight on with your projects.

author: Ian.M
author_rank: Super Contributor
timestamp: September 20, 2025, 01:08:17 pm
content: Disregarding anti 'C' prejudice, its trivial to write a whole program in AVR assembly language and build it under the Arduino IDE using the GNU AVR assembler. You simply need a sketch that's totally empty except for documentation comments, and an assembly source file in the same folder calledmain.S(the name and capital S is important) containing an entry pointCode:.global mainwhich override the arduino environment's main function, and thus the compiler's startup code will jump to your assembly main: label.You can do it all from the classic Arduino IDE without fiddling with files externally - simply start a new sketch, delete *ALL* the boiler plate code it gives you then use the dropdown menu to the far right of the tab title to add a new tab. It will ask for the name so entermain.Sand its ready for you to enter assembly language code.Blink example for ATmega328P based boards with the built-in LED on D13 attached.There is however one fly in the ointment. The Arduino environment uses Timer 0 for various housekeeping purposes and defines an ISR for its overflow, unfortunately without the weak attribute, which clashes with any Timer 0 overflow ISR you attempt to create.

author: Analog Kid
author_rank: Super Contributor
timestamp: September 20, 2025, 05:53:02 pm
content: Quote from: SteveThackery on September 20, 2025, 08:22:38 amNo. Just no.I know C; I've written plenty of C code (in another lifetime).I have nothing against Cfor other people;it's a fine high-level language. I just don't like writing it myself.It's not out of ignorance.I prefer assembly language.(Pointer handling is a piece of cake using it.)And I definitely don't need scolds like you telling me what I should or shouldn't do, in the name of science, technology or anything else.

author: Analog Kid
author_rank: Super Contributor
timestamp: September 21, 2025, 08:25:57 pm
content: [ Specified attachment is not available ]Quote from: ledtester on September 16, 2025, 09:11:02 pmInstalling it now. My god, what a bloated package that is! Download is ~1/3GB. Taking forever to unpack.Uh-oh: got the first error alert:I went ahead with the installation anyhow. It ground on for a while, then I got this message:OK, I'm done with that. 2 strikes and you're out. As I said, life is just too god-damned short for me to be farting around with stuff like this.I want a package, ideally not a bloated whale weighing close to a gigabyte, that installs cleanly.Am I asking too much? Ferchrissakes, it's fucking2025already! Is this really the best we can do?Or are programmers really all masochists?Sheesh.Having vented, I do appreciate you having taken the time to put together a possible solution for me. Unfortunately it doesn't seem to be what I want.And I wanted to bring some closure to this thread by replying to you; I hate when someone asks a question here, gets a reply and is never heard from again.So I'm still searching for something, some toolchain, which would fit my requirements and allow me to easily install and get up and running.If anyone knows of such a solution I'm all ears.

author: SteveThackery
author_rank: Super Contributor
timestamp: September 21, 2025, 09:10:03 pm
content: Quote from: Analog Kid on September 20, 2025, 05:53:02 pmOh, for goodness' sake! Calm down! I'm not "telling" you anything; I'm making the case for an alternative solution, hoping you will give it further consideration.Do you really suppose I give a fuck what you end up doing?PS: Scroll up a few messages. Ian.M has given you the solution.

author: saipan59
author_rank: Contributor
timestamp: September 21, 2025, 09:18:06 pm
content: Quote from: Analog Kid on September 21, 2025, 08:25:57 pmRepeating a sort-of summary of one of my earlier replies:- The T.I. Code Composer Studio should be around 100 MB. I've been using it for about 15 years, never had any big install issues that I can recall. If you're on Win7, you should install an older version (probably V8). Many versions are on the TI site.- Use one of the MSP430 eval boards (they call them "LaunchPads"). Several versions available, starting at around $10 I think. A fancier one might be closer to $20. The T.I. site is a little awkward to navigate - let me know if you want a direct pointer.- In CCS with an MSP430, the IDE lets you create an "empty assembler project" with just a few clicks. See the one I posted previously.- The LaunchPad comes with a short USB cable to plug into your PC. No other HW is needed to write and test some code. Even the simplest LaunchPads have an LED that you can blink. Some boards have cooler gadgets on-board.- You have mentioned wanting ADC functionality. I think it's safe to say that ALL the relevant chips will have (as a minimum) a 10-bit ADC. Some are 12-bit or more, and some do relatively high sample rates.- After some experience with the (simpler) MSP430, you can get a LaunchPad that has one of the ARM-based parts on it (but note that from what I see, the assembly-only support is 'limited' on those parts, but it's easy to just do an empty C project and then call assembly routines).The above meets your requirements, right?It is likely that the other major MCU vendors have very similar stuff to what I described above. I suspect (not sure) that the "issue" with the Pico (and similar) is that it's an entire "ecosystem" that is trying to be everything for everybody. So perhaps an advantage of using the chip vendor's tools is that they are focused on doing mostly just what the chip can do.Pete

author: Analog Kid
author_rank: Super Contributor
timestamp: September 21, 2025, 10:09:11 pm
content: Quote from: SteveThackery on September 21, 2025, 09:10:03 pmOK: that post says:Quote from: Ian.M on September 20, 2025, 01:08:17 pmThe Arduino part I can figure out (I'm assuming most any Arduino micro will work, yes?).But the software: what exactly is it (the Arduino IDE and the GNU AVR assembler)? Where do I get these? and I'm assuming Windows here, not Unix, right? (Whenever I see "GNU" I assume Unix.)I don't like not being able to use the timer interrupt. So that's a point against it.

author: Ian.M
author_rank: Super Contributor
timestamp: September 21, 2025, 11:07:59 pm
content: See Ledtester's reply#39. The Arduino IDE bundles the GNU avr-gcc toolchain, including the avr-as assembler. You can use the IDE's board manager to install toolchains for other processors e.g this Raspberry Pico one:https://github.com/earlephilhower/arduino-picoand a similar empty sketch + main.S approach should work for Pico ARM assembly language code.YMMV, as toolchains from 2020 onwards are increasingly less likely to install and run properly on Win7. . .

author: cfbsoftware
author_rank: Regular Contributor
timestamp: September 21, 2025, 11:20:29 pm
content: Quote from: Analog Kid on September 21, 2025, 08:25:57 pmUnfortunately your specific requirements do not appear to be flexible enough to make that happen. If and when you are able to remove "Windows 7" and "Assembler" from your requirements I would suggest you try our complete integrated development system (NOT a "toolchain"),Astrobe, that allows you to edit, compile, link and run your code written in a high-level language (NOT "C") and can literally be installed in a couple minutes. Believe it or not, the installation setup file is less than 3 MB (NOT GB). That and a 64-bit Windows PC is all you need. This is all thanks to Prof Niklaus Wirth. This guy explains it a lot better than I could:https://berthub.eu/articles/posts/a-2024-plea-for-lean-software/

author: Nominal Animal
author_rank: Super Contributor
timestamp: September 21, 2025, 11:34:39 pm
content: Quote from: Analog Kid on September 21, 2025, 10:09:11 pmThat definitely explains the difficulties you're having. One would need to rely on facts to get this kind of stuff going, instead of relying on incorrect emotive assumptions. Hint: consider the recursive acronym from which GNU comes from: GNU is not Unix. And no, it's not Linux either.

author: Analog Kid
author_rank: Super Contributor
timestamp: September 21, 2025, 11:53:25 pm
content: Quote from: Ian.M on September 21, 2025, 11:07:59 pmI went ahead and installed the Arduino IDE just to see if it would work. It did.I got 2 warnings from Windows Firewall about accessing some stuff in the outside world (from Adafruit), which I clicked through.Asked me if I wanted to install a bunch of drivers (USB, serial, LPT) which I said yes to.IDE window came up.So: it's obviously C-centric; all the "sketches" are expected to be C.But I don't want to program in C. And I really don't want to write assembly language as inline assembler in a C program.So how do I get it to accept an assembly-language program?I've poked around my file system and I cannot find anything like the GNU assembler you mentioned. Is this part of the package I just downloaded?Just to be clear: I followedthe instructions given in the Arduino forumthat was linked to earlier, so I ended up with a previous version (2.1.1); the instructions were fine. I got the package fromthis GitHub page. (I downloaded the installer [.exe] version of the package.)One criticism: when you run the IDE for the first time, you get ... nothing, no window, no dialog, no nothing, just a hell of a lot of disk activity. Then you get various dialogs popping up asking if you want to install this or that device driver.Now if it were me, I'd put up at least a skeleton dialog, saying that the IDE was being set up, and that this or that was being done--you know, just like most software does these days. It's called user feedback. (Well, I guess programmers are special people who don't need any steenkin' feedback.)Further clarification much appreciated.

author: Ian.M
author_rank: Super Contributor
timestamp: September 22, 2025, 12:21:48 am
content: Download the attachment from my reply #41. Unzip it. drill down to the .ino file in a folder with the same name. Double click it and it will open the Arduino IDE and give you two tabs, one for the .ino file - normally a C++ program, but in this case just a comment, and the other the main.S AVR assembly language 'blinky' for ATmega328P I put together for you. And yes I did test it on a Chinese Arduino Nano clone.If you'd installed the v1.8.19 legacy Arduino IDE that Ledtester recommended it would be a lot smaller, lighter and quicker to start (with a splash screen) but OTOH its a fairly primitive and sucky IDE. However if you find your PC isn't fast enough to run v2.1.1 responsively, consider installing v1.8.19! The worst suck is the library manager, which you wont need for assembly language . . .N.B. avr-as is a bit lax compared to the Atmel assemblers. If you want to build main.S under Atmel Studio with their own assembler not GCC avr-as, you'll need to fix the two ldi instructions just before delaylp: which should refer to registers r31 and r30, not 31 and 30. You can also use a #ifdef ARDUINO to detect if you are building under the Arduino IDE, to let you use a different #include for GNU avr-as or Atmel's assembler so the same main.S file will build under either IDE.

author: saipan59
author_rank: Contributor
timestamp: September 22, 2025, 12:43:59 am
content: Quote from: cfbsoftware on September 21, 2025, 11:20:29 pmAstrobe question: I don't know much about the larger ARM ecosystem. I see that Astrobe works on certain specific parts. Does that mean it does NOT work on other vendor's ARM parts? Or just that others have not been tested?Pete

author: cfbsoftware
author_rank: Regular Contributor
timestamp: September 22, 2025, 04:26:28 am
content: Quote from: saipan59 on September 22, 2025, 12:43:59 amIt is just that others have not been tested. While the code generated by the Astrobe Oberon compilers could work on any ARM Cortex-M0, M3, M4 target, it is identifying the differences in the peripheral definitions (GPIO, UART, PLL, SPI, I2C etc.) that generally takes the most time when adding support for a different MCU.