5 ms·
This device is a one time programmable (OTP) device from what I saw, and it has 79 instructions so you need to write assembly level code and write them to the d
by davismwfl 7y ago
This device is a one time programmable (OTP) device from what I saw, and it has 79 instructions so you need to write assembly level code and write them to the device using a specific programming device.
If you are getting familiar with embedded programming using too NodeMCU, I doubt you'd find much fun in these types of devices as it is nearly as low level as you can get. Assuming I read it correctly and these are OTP devices then think of each time you "test" you are burning 5 cents, as you will use up a chip as you can't reprogram it. When I did some OTP device programming I had an emulator we wrote against and tested there first, then we would write to the chip (still burned through them though as it is part of the process).
Also, these are the types of devices used for doing a single repetitive task well while other more capable MCU's are doing other work and making larger decisions. Typically these would not be the heart of any system, just an ancillary chip offloading some very basic functionality that is very repetitive and that has little to, ideally, no business logic at all.
- tombert 7y agoI'd still like to play with them just to get a better understanding of computers. I'm typically more of a math guy than hardware, but since I do program for a living, understanding the guts of how these things work could be really valuable. How did you learn OTP programming?
- davismwfl 7y agoHonestly, OTP isn't much different than writing for any other chip, the difference is just you only get one shot per chip. So if you made a mistake in your code and burn a chip, oops it is trash so you start over with a new one. Also, I kinda use machine and assembly language interchangeably, but in reality they do have some slight differences with assembly technically being slightly higher level than machine, just be aware some purists get on their rants about this, and literature can sometimes be confusing if you don't know there are a few differences. You'll have to pick up their machine instructions and learn them, since it is RISC based they likely stuck close to one of the RISC based standards as there is no reason to reinvent the wheel. You can absolutely do it, I would just think it might make more sense to start just a little higher level first, then go here. But I totally respect jumping to the lowest level and working up as I have done that too. To get started, I am sure they manufacture a programing/flash board, buy it and a bunch of chips. Find a problem to solve that makes sense given what you are working with, and learn their machine instructions. If you know how to program the basics are the same, except you have to manage everything, clock, RAM, register spaces etc. Lots of good books on embedded work, just remember that the chip you are looking at isn't really a micro processor, it is a limited micro controller. I started off in Basic, C, Pascal and Motorola assembly (then x86) way back when, then kinda settled into C/C++ for low level and Javascript for pretty much everything else, except mobile. So how I learn these is just by doing exactly what I am suggesting to you, find a problem that seems fun to solve and just start working at it. Sometimes for my own sanity, I would write things in C to get a feel for what I wanted to do (just mocking up in/outputs), just helped me think a little higher level at first. I would also many times output the assembly using gcc as a way to give me some ideas, but usually that is just an idea since these small micro controllers aren't likely supported by any major compiler. Good luck, this can be a ton of fun.
- nullwasamistake 7y agoDavismlfw knows his stuff. If you're more math than hardware you need to become a hardware guy before messing with these. As a start I would learn analog circuit design at a basic level. Followed by digital design and layout. At any point in this, pour your mind into a micro datasheet. Atmel or TI are easiest to read. You need to understand this stuff at a pin = signal level and below to really work at that low a level effectively. This is why arduinos etc are so relatively expensive. It's a ton of work to learn what's needed to design and build these boards + actually program them usefully Ideally you want to understand power electronics and DSP/signalling at a deep level as well. If you don't know what the difference between level and edge triggered is, for instance, you're going to have a bad time. Gray code, busses, ohms law, network analysis. This is a deep but fulfilling rabbit hole.