At89c2051 Programmer Using Usb To Serial Ttl UPD
LINK ::: https://blltly.com/2thcEU
A FTDI cable/module/or board mounted can only program avr chips if there is already a bootloader burned onto the chip. What is required if not using a bootloaded chip is a AVR harware programmer. Note that one simple AVR programmer is another arduino board running the IDE example sketch aruinoISP. Then wire the SPI pins required between the arduino board and the chip to be programmed.
Set the baud rate of the position drawn by the red circle to 19200. Confirmed as COM1 port. Then turn on the power of the 2051 programmer, and "Hello World" immediately appeared on my PC serial debugger.
You can build this design using the schematic and firmware, or buy a kit from the Adafruit webshop. Having a full kit available solves the "chicken & egg" problem of purchasing or building a USB programmer that then needs a programmer of some sort to 'kick start'. (See USBasp, AVRdoper, USBprog)
The AVRISP, which we will be emulating, usually connects to a PC through the serial (COM) port. The trick here is to install a COM bridge, a piece of software that makes two virtual COM ports that are hooked up to each other so when you write to one it appears on the other. The compatibility software sits on one COM port, pretending to be a AVRISP while the AVRStudio software talks on the other, thinking that it's connected to a genuine programmer!
Microprocessor and microcontroller pagesGeneral infoMicroprocessors are essential to many of the products we use every day such as TVs, cars, radios, home appliances and of course, computers. Microprocessors are the core of a computer, but they are used alsoin many other applications (for example embedded devices). The biggest chunk of the digital business comes from processors butprocessors are only 2% of all semiconductors market. Thirty percent of the world's semiconductor sales come from microprocessors, DSPs, microcontrollers, and programmable peripheral chips. A tiny 2% sliver of the market is all that processors contribute, but they generate a whopping 30% of the dough. There is difference how different microcontrollers are sold. In the processor arena, it's the 4-bit microcontrollers that are the cheapest.The small 8-bit chips (little old 8051s and 6805s) are the best-selling type of processor. This kind of smallprocessors are found embedded in a wide varierty of electronics devices, ranging from small gadgets and home equipment control to car electronics.Those small controllers areflying off the shelves at the rate of more than 3 billion new chips per year(more than half of the microprocessor sale per units). But they're not very expensive, so they're less than 15% of the fiscal tonnage.At the opposite end of the scale are-big surprise-32-bit microprocessors. This category includes PC processors like Pentium 4 and Athlon, of course, but also dozens of embedded processors such as PowerPC, 68k, MIPS, and ARM chips. Most (98% or so) 32-bit processors are used in embedded systems, not PCs. ARM-based chips alone do about triple the volume that Intel and AMD peddle to PC makers. PC processors are only 2% of all processors in volume, but PC processors are 50% of all processor sales in money. This means that PC processor makes 15% of all the money made from every type of semiconductor from every company everywhere in the world. The reason for this is that PC processors are expensive (modern Intel CPU can cost $300) and they are sold in large volumes.Taken as a whole, the average price for a microprocessor, microcontroller, or DSP is just over $6. Most microprocessors are much cheaper than that, but then there is always those expensive ones in the market that pull the average price up.That is the the DSP deal DSP average price is around $6 per chip, but that includes a lot of inexpensive hard-wired modem chips and the like. But the market is not huge, because the world spent less than $5 billion on DSPs on year 2002.So why the huge difference between microprocessors' effect on the economy and their comparatively tiny numbers That is where programming comes in. The programming gives the functionality to those device. Programming work provides a lot of the value to micprocessor markets.Technically CPU chips aren't any harder to make than DRAM chips. They don't cost more to make - they're just priced that way.When you select one processor for your product, you can't swap out your CPU for just any other processor. There are manyu different microprocessors around. Different microprocessors have different kind of features (some are better for some tasks than some other) and different kind of instruction sets. There are to common classifications of what kind instruction set the processor has:CISC (Complex Instruction Set Computer) means that the processor has a lasge set of instructions that perform complex tasks and RISC (Reduced Instruction Set Computer) means that that the processor has quite small set of instructions that they do less per command (complicated operations are done by combining many simple instructions to perform a complicated task). Some processors are CISC-based (like x86, Z80etc.), while other are RISC-based (like Sparc, ARM, MIPS, PowerPC).What is then a microprocessor A common example of a general purpose computer, would be a typical PCclone. The x86 processor in this machine is considered as a general purpose microprocessor, since the machine is typically used forgeneral purpose computing (computing, word processing, web browsing, multimedia etc.).What is then a microcontroller A microcontroller is by definition a is a computer on a chip. It includes all the necessary parts (including the memory) allin one IC. You just need to apply the power (and possibly clock signal) to that device and it starts executing the program programmed to it. A microcontroller generally has the main CPU core, ROM/EPROM/EEPROM/FLASH, RAM and some accessry functions (like timers and I/O controllers) allintergated into one chip. The original ideabehind the microcontroller was to limit the capabilities of theCPU itself, allowing a complete computer (memory, I/O, interrupts,etc) to fit on the available silicon real estate. Microcontrollers are typically used where processing power isn't so important. More important are generally compact construction, small size, low power consumption and that those chips are cheap.For example controlling a microwave oven is easily accomplished with the smallest of microcontrollers. There are countless number of small electronic devices which are nowdays based on microcontroller. A modern home can include easily tens or hundreds of microcontrollers, asalmost every modern device which has electronics has a microcontroller (or more than one) inside.A special application that microcontrollers are well suited for isdata logging. Stick one of these chips out in the middle of a cornfield or up in a ballon, and monitor and record environmentalparameters (temperature, humidity, rain, etc). Small size, low powerconsumption, and flexibility make these devices ideal for unattendeddata monitoring and recording. The automotive market is propably the most important single driving force inthe microcontroller market, especially at it's high end. Severalmicrocontroller families are specifically developed for automotive applications. With the continuing process of high scale integration continuing at a dizzyingpace, many standard architecture processors are turning up asmicrocontrollers. Simply (and naively stated) an embedded controller is a controllerthat is embedded in a greater system. A rigid definition isdifficult if not impossible to formulate. You could say that an embedded controller is a controller (orcomputer) that is embedded into some device for some purpose otherthan to provide general purpose computing. Embedded controllers adhere to a philosophy similarto that of microcontrollers, high integration. By including [many]features necessary for the task at hand, an embedded controller(processor) can be a powerful yet cost effective solution. Where a microcontroller [almost by definition] is a computer on achip, an embedded controller might need external components before itis considered a "computer." This is especially true regarding RAM. Embedded processors come in many flavors and varieties. Depending onthe power and features that are needed, you might choose a 4, 8, 16,or 32 bit microcontroller. Standard microprocessors (such as theMotorola 68000 or National 32032) are frequently used as powerfulembedded controllers. In addition, specialized processors areavailable which include features specific for communications,keyboard handling, signal processing, video processing, and othertasks.When talking about embedded processors, you might wonder what is embedded system where those are used. Usually an embedded system is a system whereby the user is not givendirect access to any level of code, they are to treat the entire system as ablack box, press a button and some action occurs."Embedded" has a legalistic definition as "being supplied as a componentpart of a larger system". Most embedded computers don't "look like" computers.Although generally PC's are not defined as embedded systems, however if youremove the case, they can become embedded systems. Foe example many embedded industrial systems are based on PC hardware: a x86 motherboard (different form factor of course) with out some ofthe extra stuff like PCI slots etc, mostly everything is onboard that'sneeded. Embedded programming implies programming a system in which resources are limited, and which may need to run without manual intervention, so all errors need to be handled. Simplest of such kind of error handler just restarts the system if things go wrong. Many embedded systems use watchdog systems to handle errors like software crash (watchdog just resets the system of software stops notifying watchdog timer that is running properly).Real-time just implies that time is a critical factor in any function of theembedded system.Real-time implies a system in which if a single event is missed or over-runsit's time slot the whole system has failed (possibly with disastrousresults), so this must not be allowed to happen. Hard real time is usually taken to mean that any missedtime constraint is a failure. Soft real time is taken to mean that somemissed deadlines are acceptable, or at least won't endanger life, property,or cause loss of money. An automatically controlled airplane is a situation of hard-realtime, if ittakes tooo long for the system to reacht, the plane will crash. PC a game could be considered real-time, if youdon't get the next frame within xx mS then you will not be appreciativebut nobody gets hurt or anything damaged (hence, soft real-time).Some common terms related to the microprocessors and microcontrollers: Von-Neuman Architecure: Microcontrollers based on the Von-Neuman architecture have a single "data" bus that is used to fetch both instructions and data. Program instructions and data are stored in a common main memory. When such a controller addresses main memory, it first fetches an instruction, and then it fetches the data to support the instruction (if such data is needed). Harvard Architecture: Microcontrollers based on the Harvard Architecture have separate data bus and an instruction bus. This means that data and instructions are stored into separate memories that are accessed separately. CISC (Complex Instruction Set Computer): Almost all of today's microcontrollers are based on the CISC concept. The typical CISC microcontroller has well over 80 instructions, many of them very powerful and very specialized for specific control tasks. RISC (Reduced Instruction Set Computer): RISC microcontroller has smaller number of commands than CISC microcontroller, and those commanda are generally simple (do less work per command). By implementing fewer instructions, the chip designed is able to dedicate some of the precious silicon real-estate for performance enhancing features. Benefits are uually s amller chip and lower power consumption. The industry trend for microprocessor design is for RISC designs. SISC (Specific Instruction Set Computer): SISC microcontroller instruction set is designed for a special application in mind. At the expense of the more general purpose instructions that make the standard microprocessors (8088, 68000) so easy to use, the instruction set was designed for the specific purpose of control (powerful bit manipulation, easy and efficient I/O, and so on). CMOS (Complementary Metal Oxide Semiconductor (CMOS): CMOS the name of a common technique used to fabricate most (if not all) of the newer microcontrollers. CMOS based microcontroller requires much less power than ones made with older fabrication techniques, which permits battery operation. CMOS chips also can be fully or near fully static, which means that the clock can be slowed up (or even stopped) putting the chip in sleep mode. CMOS has a quite high immunity to noise (power fluctuations or spikes), althrough it does not like static electricity spikes (unless special protection is included in the chip). EEPROM (Electrically Erasable Programmable Read Only Memory): EEPROM is non-volatile memory is generally use for small amounts of memory that hold a limited number of parameters that may have to be changed from time to time. Many microcontrollers have limited amounts of EEPROM on the chip. FLASH (EPROM): FLASH is erasable and reprogrammable non-volatile memory. Flash provides a better solution than regular EEPROM when there is a requirement for large amounts of non-volatile program memory. It is both faster and permits more erase/write cycles than EEPROM. Field programming/reprogramming: Using nonvolatile memory as a place to store program memory allows the device to be reprogrammed in the field without removing the microcontroller from the system that it controls. Field-programmable microcontrollers are genrally programmable by connecting the programming device to few pins on the microcontroller and doing the programming while the microcontroller is in place in the circuit board. OTP (One Time Programmable): An OTP is a PROM (Programmable Read-Only-Memory) device. Once your program is written into the device with a standard EPROM programmer, it can not be erased or modified. A OTP part usually uses standard EPROM, but the package has no window for erasing (package with window is expensive). Software protection: Either by encryption or fuse protection, the programmed software is protected against unauthorized snooping (reverse engineering, modifications, piracy, etc.). Brownout Protection: The device is held in reset and will remain in reset when Vcc stays below the Brownout voltage. The device will resume execution (from reset) after Vcc has risen above the brownout Voltage. Idle/Halt/Wakeup: The device can be placed into IDLE/HALT mode by software control. In both Halt and Idle conditions the state of the microcontroller remains. RAM is not cleared and any outputs are not changed. Normal operation is rested with wakeup (usually interupt) or reset. Idle mode: In IDLE mode, all activities are stopped except on-board oscillator circuitry, watchdog logic, clock monitor and idle timer. Power supply requirements on the microcontroller in this mode are typically around 30% of normal power requirements of the microprocessor. Idle mode is exited by a reset, or some other stimulus (such as timer interrupt, serial port, etc.). A special timer/counter (the idle timer) causes the chip to wake up at a regular interval to check if things are OK. The chip then goes back to sleep. Halt mode: In Halt mode, all activities are stopped (including timers and counters). The only way to wake up is by a reset or device interrupt (such as an I/O port). The power requirements of the device are minimal. UART (Universal Asynchronous Receiver Transmitter): A UART is a serial port adapter for asynchronous serial communications. USART (Universal Synchronous/Asynchronous Receiver Transmitter): A USART is a serial port adapter for either asynchronous or synchronous serial communications. Synchronous serial port: A synchronous serial port doesn't require start/stop bits and can operate at much higher clock rates than an asynchronous serial port. Used to communicate with high speed devices such as memory servers, display drivers, additional A/D ports, etc. Can also be used to implement a simple microcontroller network. SPI (serial peripheral interface): A SPI is a synchronous serial port. This is commonly used by Motorola in their microcontroller. Many peripheral chips (like A/D converters) exist which can be connected to a SPI port. SCI (serial communications interface): A SCI is an enhanced UART (asynchronous serial port). I2C bus (Inter-Integrated Circuit bus): The I2C bus is a simple 2 wire serial interface developed by Philips. It was developed for 8 bit applications and is widely used in consumer electronics, automotive and industrial applications. In addition to microcontrollers, several peripherals also exist that support the I2C bus. MICROWIRE/PLUS: MICROWIRE/PLUS is a serial synchronous bi-directional communications interface. This is used on National Semiconductor Corporation's devices (microcontrollers, A/D converters, display drivers, EEPROMS, etc.). CAN (Controller Area Network): CAN is a mutiplexed wiring scheme that was developed jointly by Bosh and Intel for wiring in automobiles. The CAN specification seems to be the one that is being used in industrial control both in North American and Europe. J1850: J1850 is the SAE (Society of Automotive Engineers) multiplexed automotive wiring standard that is currently in use in North America. A/D (Analog to Digital Conversion): Converts an external analog signal (typically relative to voltage) and converts it to a digital representation. Microcontrollers that have this feature can be used for instrumention, environmental data logging, or any application that lives in an analog world without using an external A/D converter IC for this. D/A (Digital to Analog) Converters: This feature takes a Digital number and converts it to a analog output. Pulse width modulator: A controllable pulse train is generated at microcontroller output. This is often used as a digital-to-analog conversion technique: A pulse train is generated and regulated with a low-pass filter to generate a voltage proportional to the duty cycle. Interrupts: On receipt of an interrupt, the controller suspends its current operation, identifies the interrupting peripheral, then jumps (vectors) to the appropriate interrupt service routine. After this routine is executed, normal program execution continues. Most microcontrollers have at least one external interrupt, which can be edge selectible (rising or falling) or level triggered. Both systems (edge/level) have advantages. Edge - is not time sensitive, but it is susceptible to gitches. Level - must be held high (or low) for a specific duration (which can be a pain - but is not susceptible to glitches). Vectored interrupts: When an interrupt occurs, the hardware interrupt handler automatically branches to a specific address depending on what interrupt occurred. Watchdog timer: A watchdog timer provides a means of graceful recovery from a system problem. If the program fails to reset the watchdog at some predetermined interval, a hardware reset will be initiated. Clock Monitor: A clock monitor can shut the microcontroller down if the input clock is too slow. Resident program loader: Loads a program by Initializing program/data memory from either a serial or parallel port. Convenient for prototyping. Monitor: A monitor is a program installed in the microcontroller which provides basic development and debug capabilities. Most modern high power microprocessors consume lots of electricity that gets converted mostly to heat. To keep the processor in safe temperatures good cooling is needed. This is especially true on modern fast PC processors. Never turn on a PC computer without a heatsink properly mounted on the CPU with a thermal interface material between the CPU core and the heatsink. A modern high-performance CPU can be permanently damaged in less than 10 seconds without proper cooling.General information linksEmbeddedRelated.comAirBorn Electronics Circuit Design Library- microcontroller circuits Rate this linkalt.comp.hardware.homebuilt FAQ Rate this linkAnalog-input circuit serves any microcontroller- This simple ADC is suitable for getting analog signals into a purely digital microcontroller. Using just five surface-mount parts, you can assemble it for less than 50 cents (1000), which is approximately half the cost of a single-chip-ADC approach in the same volume. Moreover, this design takes only one pin from the microcontroller to operate. Rate this linkarmory.com anonymous FTP archives- lots of microcontroller information, 68HC11, 8048, 8051, 8085, 80x86 Rate this linkA Set of Standard Microprocessor Programming Cards Rate this linkBorn to Fail- Systems fail, and sometimes no one is around to reset them before something worse happens. That's why watchdog timers matter. Rate this linkConfigurable processors: Stir it up- Configurable processors can be a cost-effective ingredient in your design. But they may also be an evolutionary abstraction. Rate this linkConventional DSP or configurable microcontroller: which way to go- Engineers of DSP-based systems are in a quandary over whether to use a conventional DSP or one of the new configurable microcontrollers. The technical challenges of MP3 decoding provide the basis for comparing traditional DSPs with upstart configurable micros. Rate this linkEDN's 27th Annual Microprocessor/Microcontroller Directory- year 2000 version of the EDN Microprocessor/Microcontroller Directory Rate this linkEDN's 28th annual microprocessor / microcontroller directory- year 2001 version of the EDN Microprocessor/Microcontroller Directory Rate this linkEDN's 29th annual microprocessor / microcontroller directory- year 2002 version of the EDN Microprocessor/Microcontroller Directory Rate this linkElectrical/Electronics Project Designer's Page- Electrical and Electronical Applications prepared by using Assembler Programming Language. Motor Control,Serial Communications,Temperature Control,Basic Assembler Applications,I/O Ports Design,Timer and ADC. Rate this linkEmbeddedLinks- Portal to engineering and management resources about embedded systems and microcontrollers on the Internet Rate this linkEmbedded News Digest- Your Embedded System and Microcontroller News Source, free monthly newsletter on embedded systems and microcontrollers industry events Rate this linkEmbedded Processor and Microcontroller primer and FAQ- This article is a primer and general FAQ about embedded processors andmicrocontrollers. Included is a collection of information sources. Rate this linkEmbedded Processor and Microcontroller primer and FAQ Rate this linkEmbedded Systems Glossary Rate this linkEmbedded TCP/IP: a smorgasbord of options- Internet-connected devices are not always more intelligent than stand-alone devices. Connectivity means more intelligent device management. Rate this linkExploring the anatomy of multiprocessor designs- Parallel processing can improve performance, but it can also simplify your design by better reflecting the natural partitioning of your application behavior and development resources. You can define multiprocessor designs as systems that perform functions and tasks among multiple processors that coordinate and communicate with each other to deliver a coherent behavior. A multiprocessor application is more complex than a single-processor design. It requires additional programming for housekeeping and coordinating functions, and it is more complex to debug, because of processor interactions that are absent in single-processor architectures. Rate this linkFear and loathing of porting embedded software- Using legacy software in your project can minimize your development time because you can avoid duplicating effort for design specifications, test cases, and performing implementation trades from earlier development efforts. However, legacy software, even when written in a portable language, often requires you to perform some porting. Software porting is the engineering process that transforms software so that it will operate within a new target environment. Successful software porting demands the same engineering discipline as any development project. Why, then, does a published, general, standard methodology appear to be nonexistent Rate this linkEDN Microprocessor/Microcontroller Directory- Follow the silicon-bread-crumb trail in this directory to find the perfect device for your project. Includes parametric tables of 8-, 16-, 32-, and 64-bit microprocessor/microcontroller devices and cores, plus a summary of each active vendor's offerings and activities. This is a link to the newest release of this yearly publication on-line version. Rate this linkGeneral-purpose Ps for DSP applications: consider the trade-offs- using general-purpose processors instead of dedicated DSPs for DSP-intensive applications has some advantages, as well as some pitfalls Rate this linkHigh-Availability RTOSes: A Buyer's Guide- Attention is turning to the real-time operating system (RTOS) as hardware system OEMs focus on 99.999% reliability. Rate this linkHistory of the Microprocessor- short list of PC processors from 8068 to P7 Rate this linkKeeping Embedded System Design Projects on Time and Close to Budget- article by Ken Crater, published in December 1999 I&CS (PDF file) Rate this linkLinks to some companies selling microcontroller development tools Rate this linkLogical combination- Convergence products need both RISC and DSP processors, but merging them may not be the answer. The mainstreaming of signal-processing applications, along with the growing surplus of conventional processing power, turned RISC and DSP into competitors for the same sockets. Rate this linkMicroprocessor instruction set cards Rate this linkMicroControllers and Electronics page Rate this linkPower-On Reset (POR) Circuit- One of the trivial circuit in hardware design is the power-on reset circuitry. You can find it in practically any microcontroller board. Rate this linkProfit with plug-in processors- Off-the-shelf module computers let designers skip the most complex portion of embedded-product design and simplify future upgrades. Module computers package the CPU, mass storage, and processor-peripheral interfaces on a replaceable mezzanine card. Replacing the CPU and peripherals allows designers to update and retrofit embedded devices without product redesign. Rate this linkPushbutton switch controls power supply and C- switching handheld units on and off with a pushbutton switch is a desirable feature but needs some thinking Rate this linkReal-Time Encyclopedia- web site bout real-time issues Rate this linkSteve Walz's Electronics FTP site- large FTP archive, microcontrollers and electronics documents Rate this linkSulautetun jrjestelmn suunnittelu: Veneen digitaalisen lokin mittariosa Rate this linkTiny and Inexpensive Programmable Controllers for Quick Project Development Rate this linkVirtual programmers build embedded code- With shrinking software-development schedules and a growing shortage of skilled programmers, embedded-system designers are adopting automatic-code-generation tools to stay ahead of their competition. Rate this linkEDN's 2005 Microprocessor/Microcontroller Directory- Follow the silicon-bread-crumb trail in this directory to find the perfect device for your project. Includes parametric tables of 8-, 16-, 32-, and 64-bit microprocessor/microcontroller devices and cores, plus a summary of each active vendor's offerings and activities. Rate this linkEmbeddedRelated.com- EmbeddedRelated.com is a place for Embedded Systems Developers and other profesionnals in the field to browse Comp.Arch.Embedded, participate to Embedded Systems Discussion Groups, find a good Embedded Systems Book and find a great internet Embedded Systems Resource. Rate this linkIndustry resources pagesElectronic Engineers' Toolbox- Embedded Systems, DSP, Real-Time Computing and Industrial Computing Rate this linkInterfacing circuits & C code Rate this linkSoftwareEmbedded Linux Kernel Subset- a Linux option for 8086 and 80286 class PC's and single board microcomputers Rate this linkKatix Real Time OS- for X86, 68xxx and 68hc11 Rate this linkMicrocontrollersMicrocontroller is a computer on a chip that is programmed to perform almost any control, sequencing, monitoring and display function. Because of its relatively low cost, it is a natural choice for design. It performs many of the functions traditionally done by simple logic circuitry, requential control circuits, timers or a small microcomputer.PICPIC microcontrollers from Microchip are very popular microcontrollers. PICs are easily programmable cheap microcontrollers. PIC is the name for the Microchip microcontroller (MCU) family, consisting of a microprocessor, I/O ports, timer(s) and other internal, integrated hardware. The main advantages are low external part count, a wide range of chip sizes (from 8-pin up), great availability of compilers and source code and easy programming. Flash-type devices are reprogrammable in-circuit, while OTP versions are very cheap to use at the final stage. A wide range of simple programmer hardware and software is downloadable from the net. PIC16F84 seems to be the "standard" for small gadgets you see in the web projects. If you are a beginner with PICs, a PIC 16F84A or 16F628 device is a good choice to start with. With a PIC microcontroller you can do things that would be difficult to do with discrete logic. Besides its power, you can easily "change your mind" with a microcontroller. The PIC isn't for every project. It won't replace a PC, or even a larger processor. But for many jobs it is just the right size, inexpensive, and doesn't require much in the way of support hardware. Many electronics hobbyist have used PICs because they are quite easy to start with and easy to get. There are many different varieties of PICs that run at many frequencies. There are many versions, because in hardware design you may need a certain combination of features and this will dictate what PIC you select. For a beginner there is really only two choices:The most commonly used PIC controller within electronics hobbyists seems to be PIC 16F84A (the most popular starter PIC, 18 pin IC). PIC 16F87x is few dollars more expensive version that had a plethora of features including analog to digital converters, a UART, and more. PIC 16F87x comes in 40 or 28 pin case depending on chip version. PICs are also used on some commercial devices. Here is where the dive variety of versions come to the use. There are several steps you need to take to get started: Select a PIC, assemble the tools you need (software and programmer) and learn to program. If you want a good learning experience, you can download a free simulation environment from Microchip and practice programming without spending any money or buying any chips at all. When you have some real application, then you can buy the chips you need. There are many different varieties of PICs that run at many frequencies.This compares some PICs that can be interesting: 153554b96e