Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by N9WXU

  1. It is often said about history that those who don't know their history are doomed to repeat it. In the attached image are two old computers, The one on the right is an 8-bit Apple 2e. The one on the left is a 16-bit Apple 2gs. Both of these machines should still work but they are currently buried in a closet. The game being played is a math drill and these sorts of machines and programs were a common sight in the 1980's. The Apple 2e was purchased by my parents in 1982 and was our second home computer. The Apple 2gs was purchased by ME as my second home computer in 1990 and I took it to university. I bring these machines up because programming on a desktop PC in those days was very similar to programming an embedded machine today. In those computers, the operating system was called a disk operating system and simply provided the functions required to copy a program from a floppy disk into memory and start it running. When you wanted to run a different program, you often would replace the floppy disk and reset the computer. While the program was running it has 100% freedom to access any aspect of the computer that it needed. There was no protected memory, supervisory mode access, sandboxes, etc. There were no device drivers either. interacting with the hardware meant opening up a programmers reference manual and learning about the special memory locations. In the Apple 2e, the keyboard interface was 7-bit ASCII codes accessed at two locations ($C000 and $C010). Bit 7 (the MSB) was the "any-key-down" flag which indicated that the remaining 7-bits had a valid keypress. Accessing $C010 cleared the "any-key-down" flag. In essence, every program written for these machines was "bare-metal" with size, and speed constraints more restrictive than our our modern embedded systems. The interesting lessons come from understanding that the "forefathers" of computer science such as Donald Knuth and Edsger Dijkstra were developing computer science techniques that were good because of science. They used old computers (perhaps not 6502 based) with similar restrictions as these old home computers. If they teach that linked lists are a good way to solve certain problems, that should not be understood to mean "if your computer is a 32-bit modern machine", but rather, "If you are using a computer". Every solution has tradeoff's and there are many problems that will not fit in an 8-bit system. But MOST problems that we see can be solved or even HAVE BEEN solved in computers MUCH smaller than most modern engineers realize. Before you throw more computing resources at a problem, study your solution and try to determine if you are on the right path. Is there a better algorithm or approach besides the brute force. Is there a similar historical solution that can be studied Good Luck
  2. When I took data structures 1 I had to program in Pascal (on a NeXT) and watch this movie. With the power of youtube, I can share it with everyone. It turns out that these techniques are quite helpful. The timeout driver and rtcounter driver in MCC Foundation services uses the insertion sort to keep a sorted list of timeouts advancing into the future. This is key to the driver using a single HW timer to support any number of future timeouts.
  3. The linear memory features of the "enhanced" pic16 (all the F1 devices) actually makes the PIC16 as fast as the PIC18 for most memory applications despite the PIC18 having an 8x8 multiply. Also in the PIC16F1 are two "trap" instructions that vector your code into test memory. One of these is used by the debug exec to create software breakpoints. But the other one is also available for some creative use. Perhaps somebody can make a UART boot loader that lives in test memory.
  4. I hope that team gets the AWS version working soon.
  5. Even better. The USB programming interface code is all on GitHub HERE-> https://github.com/MicrochipTech/XPRESS-Loader
  6. Scratch: https://scratch.mit.edu This environment is fantastic. Especially on a Raspberry PI or (as I have) a chrome box running Linux. One of my children (7 yrs old) LOVES scratch and is always doing little programs where some sprite is drawing lines across the screen or programming tunes with "play note" and "delay". The blocky environment is quite capable but it gets masochistic pretty fast. If all you want is the most extreme of imperative programming (do this, do that, do theOtherThing) this environment is perfect and simple for even very young kids. Perhaps this is a new paradigm to be called IMPERIAL programming. I think the accounts for each child is too simplistic. I may be an extreme case in the kid department but I don't think planning for 1 kid/student is reasonable either. I would love a parent/teacher view with dependent accounts so I can track progress on all of my children/students. Perhaps the accounts could be moved to other teachers or even graduated into independent accounts.
  7. Codebug: http://www.codebug.org.uk I like this little gadget. It is cute. It programs in a variation on blocky (like scratch, mod kit, and others). The result is a unit that you drag onto the code bug. The code bug mounts on your filesystem so programing is simply a drag/drop operation. A simulator gives you a clear indication of what will happen for simple programs. The primary usage is to respond to buttons by lighting a matrix of LED's. Helper functions are available to scroll messages and draw pictures. It was the work of about 30 minutes for my 9yr old to compose a winking smiley face animation. A coin cell allows the child to "go show Grandma" with a standalone project. I don't like that you have to have a web account to use the tool. This requires the child to have an account. With multiple kids (I have 9) there is no support to have a master account with kid accounts where the "badges" and "accomplishments" can be kept separate. For those not familiar with CodeBug, this is what the interface looks like.
  8. Those of us with kids are always looking for fun ways to introduce them to the world of embedded systems. In addition to VEX IQ and VRC competitions, my kids have enjoyed the code bug and scratch. I will place a number of products I have used with the kids as separate replies.
  • Create New...