Posts

Showing posts with the label coding

Free C ?

Image
I saw an email on the Piclist that Microchip Technology (the PIC people) have made the full XC compilers including the optimization stuff (whatever that is) free for the downloading.  It used to be that the unoptimizing compiler was available as a part of MPLAB.  Here is the press release: https://ir.microchip.com/news-events/press-releases/detail/1403/microchip-expands-developer-access-with-free-mplab-xc-compilers-and-mplab-machine-learning-development-suite I've made many attempts to learn programming beyond PIC assembly language but never made much progress.  Theoretically it should increase productivity but I dunno - I'm just not that great at programming.  It sounds like a lot of folks are becoming, in effect: "systems analysts". they don't write code, they spec what they want the code to do.  Then the AI generates the code.  The person then reviews, tests and tweaks the input to AI for any necessary changes.  I can't see doing that either, especi...

the writer's trick

Image
Ernest Hemingway    I remember my Dad telling me about a method that Hemingway used to avoid writer's block.  Nearing the end of a writing session and knowing where you are going with the writing task, stop right there and leave it for the next day.  The idea is that the next day you will know where the story is going and the words will flow, no block possible. Or as Hemingway put it:   "The best way is always to stop when you are going good and when you know what will happen next. If you do that every day … you will never be stuck. Always stop while you are going good and don’t think about it or worry about it until you start to write the next day. That way your subconscious will work on it all the time. But if you think about it consciously or worry about it you will kill it and your brain will be tired before you start." — Ernest Hemingway I don't know if this works - writing itself never seemed like a big problem to me although I don't worry over words the w...

The problem with programming for me

Image
The computer does EXACTLY what I tell it to do (at least with PIC microcontrollers).  The problem is that what I tell it to do is often flawed logically, in other words  the computer does what I tell it to do, not what I want it to do. This happened with the LCD Metronome period timer: a period of 1.1767 Sec I just couldn't get it to work and then it finally dawned on me what the problem was.  Most LCD alphanumeric displays use a Hitachi chip known as the HD44780 (or a clone).  To save pins the data and commands are written to the 44780 chip in 4 bit blocks (4 bit nybbles versus 8 bit bytes, get it ?).  Although I had been writing the characters in two nybbles, with the control data I had only written 1 nybble so the display was jumbled.  An easy fix once I realized what was happening.   Not much of a blog post but sometimes I get frustrated. There are times when after clanging my head against the wall a sudden inspiration comes and the problem gets fi...

Before flash there was EPROM that couldn't be erased !

Image
 The first kit I sold was the Island Keyer which used a Motorola microcontroller IC, the MC68HC705J1a: The J1a had the program stored in EPROM (Erasable Programmable Read Only Memory).  Usually EPROMs had a ceramic package with a quartz window like this PIC12CE674 chip: When developing the product the programmer would program the EPROM but then when it didn't work :) a UV light would be used to erase the program from the memory.  Since the erasure took minutes (I forget exactly how many) usually the programmer would have at least two windowed parts so that one could be erasing while the other would be used in a circuit. The much cheaper plastic production parts couldn't be erased though, unless the user had access to an x-ray machine ? Unfortunately Motorola made the windowed parts "unobtainium" - the distributors like Digi-Key only had the plastic parts.  Apparently when you are selling to Ford or some other big customer they didn't need the little customers. Bu...