![]() You can also read the existing program out of a chip (unless a read-protect bit has been set) and there are special ways of pulsing the I/O lines to erase the whole chip and so on. The chip is programmed a byte at a time by setting up each byte on 8 of the chip’s I/O lines and then pulsing some of the other I/O lines to ‘burn’ the byte to flash memory and move on to the next byte to be programmed. Of course I could have bought a programmer to do the job, but reading the chip’s data sheet it seemed straightforward to do the programming with an Arduino – and I thought it would be a fun project to do that. I wanted to reprogram the chip so I could use the kit as a stopwatch/timer instead of a regular clock. I came across the chip as it’s often used in cheap 7-segment clock kits such as this one from BangGood (only £2.71 at the time of writing). ![]() ![]() It has 15 I/O lines, a UART, an analogue comparator and two 16-bit timer/counters. It has 2K bytes of Flash memory to hold the program and 128 bytes of RAM. It works from 2.7V to 6V at anything from 0 Hz up to 24 MHz. It runs MCS-51 (commonly termed ‘8051’) code. The Atmel AT89C2051 is a low cost microcontroller in a 20-pin DIL package.
0 Comments
Leave a Reply. |