Hein (fub) wrote,

  • Mood:

Coding the segment driver

I have been writing the code for the segment driver. I think it's the most complex piece of code I have produced for the PIC to date.

In my first year in university, I had to write my own higher-level programming language using gpm, a macro processor. With some 'simple' text substitutions, we were able to write while- and for-next-loops -- the output were 1s and 0s that we ran in a SPARC emulator, which produced some real results.

Coding this particular piece of assembly, I spend a lot of time hand-crafting loops and if-then-else statements. These things are easy to get wrong, resulting in unpredictable behaviour, and I would love to use a higher-level programming language for those parts.
But as it is, I have very little working memory left for variables, and I really like being able to have minute control of what the PIC is doing. And the whole business with pointers is a disaster waiting to happen if you don't have that level of control.

Sure, most programming languages allow you to mix in assembly, but I think I'll keep at it in assembly, rather than debugging the mix of the two.
Tags: electronics project, random led rail

  • Update

    Wow, what with one thing and another, I haven’t posted on here in a month! Time to give a short update on what’s been happening.…

  • Final RPG-a-Day: Thank

    The last prompt for RPG-a-Day this year is ‘Thank’. If you have read every entry of this year’s RPG-a-Day, then I certainly…

  • Next-to-last RPG-a-Day: Mention

    Today’s prompt is ‘Mention’. I guess this is where I mention people I look up to, or websites I frequent? Ok, here’s…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded