Back in the day, when 8-bit processors were king, memory chips had limited storage space and were expensive. By today’s standards, software development tools were crude and limited. To get any sort of performance from a microprocessor running at less than 5 MHz, the code needed to be efficient. Therefore, programmers often had little choice but to write in assembler (using instructions that have a very strong resemblance to machine code), passing it through a linker to produce an executable hex file.
In this project, we write a routine in assembler and run it on an up-to-date PIC processor, outputting a sine wave via its in-built digital-to-analog converter (DAC).
This project should give you a new appreciation of all the unseen work that compilers of higher-level languages normally take care of. However, if you want the best performance from a processor and wish to see what is going on at register level, you have to work in assembler.
Downloading of this magazine article is reserved for registered users only.
Discussion (0 comments)