Hello,i am a newbie with ATMEL MCU family,but i want to change the software on a AT89C2051 wich contains an 'HORLOGE 7 segm Program '.I know it is a very old MCU, but that is. ( else i could use a PIC MCU!)I have a new AT89C2051, and want to program it, with this interface using a PIC16F877 ( i know well PIC MCU)i can modify the programer if needed. (obliged also, because using a QUARTZ 4MHz instead of 3,6864Mhz ).My question:Does someone allready builded and used?menu displayed on UART terminal.1 - READ DEVICE, HEX2 - READ DEVICE, BINARY3 - VERIFY, HEX4 - VERIFY, BINARY5 - READ SIGNATURE BYTES6 - BLANK CHECK7 - LOCK BITS8 - PROGRAM DEVICE, HEX9 - PROGRAM DEVICE, BINARY0 - ERASE DEVICEM - MENU.to get some feeback or tricks.What is the best tools to compile.asm?In case of bad result with that, i allready ordered.
With 40 days delai!!it is why i try to build one myself.the final purpose is to help a forumer on.and include into the 'Horloge' program an output bit HZ and an output RAZ.some help will be welcome. Gosh.Search engines keep messing up their url's in ever more horrible ways.Duckduck didn't immediately give the results I hoped:duckduckgo.com/html?q='at89c2051'+HORLOGE+7+segm+ProgramAfter deleting most of the tracking garbage and unwanted commercial garbage results from the ever more horrible google search engine I came up with:And that almost directly points to an instructable with source code:That instructable seems to be made from this kit, but that does not seem to have source code.Does this happen to be the same hardware as you are using?This line gives me a lot of information. Paulfjujo wrote: What is the best tools to compile.asm?Because.asm files are not compiled, but assembled (That's why they call it assembly:)Your lack of nowlede of what sort of tools to use also suggests hou have no experience with them.Add those two and it tells me your experience with uC's is pretty low.Don't feel offended. I was there once too.Writing assembly is quite an involved process.When compared to writing in C I sometimes get quotes it takes about 10x the amount of time that deloping the code in C would.Reverse engineering assembly (without any comment etc.) is.
A lot (And I mean A LOT) more 'involved'.I strongly want to advise you to stay away from assembly unless you have a very specific reason to write code in assembly.Writing programs for uC's is difficult enough for beginners. Why torture yourself with asm?Are you interted in learning C?AT89xxxx uC series is (as far as I know) unfortunately not supported by GCC (A very good and FREE (as in freedom)) C compiler.That is probably the reason that the instructable above uses keil.Keil is a commercial programmer. They might give away some limited / crippled version with which you can write some code for the AT89xxxxCommercial programs are never 'Free' in the way that open source compilers such as GCC give you freedom.AT89. Is 8051 based and it is supported by SDCC.Note:AVR freaks might not be the best forum for 8051 uC related questions. Hello, me again.Did a search for pin compatibility:It seems that the AT90S2313 is pin compatible with the AT89C2051AT90S2313 is pretty much obsolete and probably 'not recommended for new designs'.About 15+ years ago Atmel made a succesor, the ATtiny2313.See also this thread from 2004. That's how old those chips are.So if you want to learn some stuff about microcontrollers I really recommend in updating your hardware a bit.Is your AT89C2051 in a socket, can you easily replace it?PS: If you replace it with an ATTiny, you can always return your kit in the original state if you feel like it.
Paulvdh wrote: paulfjujo wrote: What is the best tools to compile.asm? Because.asm files are not compiled, but assembled (That's why they call it assembly:) Your lack of nowlede of what sort of tools to use also suggests hou have no experience with them.
Add those two and it tells me your experience with uC's is pretty low. Don't feel offended. I was there once too.Hello,assembler convert asm langage to binary for the MCU.Compiler convert more evoluate langage to binary for the MCU.you judge a person on a litle mistake of langage!i allready worked with many assembler.
From 6502.to 80386 and also with MPLAB ASM for PICso you better have to correctly write knowledge.nevermind, i successfully wrote a programmer with a PIC16F877 to program my AT89C2051and wrote my Horloge program with MikroC for 8051all works fine, without your support.it is a shame to consider other as you have done.
Tutorial 20Next TutorialUART TTL-USB Converter TutorialIntroductory Level ★☆☆☆☆In this tutorial, you’ll learn how to create a communication channel between your PC & the Microcontroller via UART serial port. We’ll be using a serial USB-To-TTL converter module as we can’t just hook the RX/TX pins to the D+/D- pins of a USB Port.
We’ll develop the required firmware/software in order to configure the MCU for data transmission, and our PC for receiving & monitoring data respectively. So let’s get started! Tutorial Contents.Components Needed For This TutorialQuantityComponent Name1PIC16F877A1Breadboard1Jumper Wires Pack1USB-TTL Converter2LEDs2330Ω Resistors14MHz Crystal OSCillator1LM7805 Voltage Regulator19v Battery or any Power Supply Source1PICkit3 (PIC Programmer)PrefaceAs you might have learned in the C-programming class/course, for inspecting (checking) the value of any variable in your program you’ll just pass it to the printf function and it’ll get displayed on the console screen of your computer. The process is as follows: A variable in the RAM of the PC is sent to the display device (screen) of the same computer. Just as simple as it seems to be!However, in the Embedded-C programming, you just can’t do that. Despite having your variables stored in the RAM, you still have no way to display them other than using the parallel/serial ports.
Using the parallel IO ports is kind of inefficient way to do so as you’ll be unnecessarily using a whole bunch of IOs & still getting binary output which may not make that much of sense in many situations. The parallel IO ports can still be used to display your data in a more convenient way such as 7-segments display as we’ve discussed earlier in this course.
Or even the alphanumeric LCDs as we’ll see in the upcoming tutorials.On the other hand, the serial ports provide a convenient way to shift out your data from the RAM to another device that can display it (e.g. Desktop, Laptop, Serial LCDs, etc). And that’s what we’re going to do in this tutorial.Having the ability to do so, will help you debug your code, provide visual UX for your projects, and much more.UART Quick ReviewIf you’re following this series of tutorials, you should have completed the UART demo tutorial.
Brief DescriptionThe PL-2303 chip provides a convenient solution for connecting a UART-like full-duplex asynchronous serial device to any Universal Serial Bus (USB) capable host. The PL-2303 highly compatible drivers could successfully simulate generic COM ports on most operating systems.By taking advantage of USB Bulk Transfer Mode, large data buffers, and automatic flow control, The PL-2303 is capable of achieving higher throughput. When real RS232 signaling is not required, baud rate higher than 115200 bps could be used for even higher performance.
The flexible baud rate generator of PL-2303 could be programmed to generate any rate between 75 bps to 12M bps.PL-2303 is exclusively designed for mobile and embedded solutions in mind, providing a small footprint that could easily fit into any small PCB layouts. Download The DriversIn order to use the USB-TTL converter module to establish a communication between your PC and the microcontroller. The PC has to have the device drivers properly installed on the operating system.
Follow the link down below in order to get the module’s drivers for:☑ Windows ☑ MAC OS ☑ Linux / Android (Has built-in drivers)☑ Latest Android Java drivers After successful driver installation, the USB-TTL module should take a random COM port identifier as shown in the image down below.Developing Software/Firmware PiecesThe practical LAB of this tutorial is going to be a simple PC-Controlled embedded system. Which means a computer software is involved (for the PC) as long as a firmware code (for the Microcontroller).
Computer SoftwareThere are many options to choose from for this part. You can obviously use any serial terminal (e.g. TeraTerm) or even the simple Arduino Serial Monitor or whichever you prefer.
Arduino Serial MonitorFor those who are interested in building their own UI Serial Terminal Application, I’ve also taken this route when I was in the same situation. However, it may be unnecessarily overwhelming at this moment. You can just plan to do it in the future after getting this LAB done & tested with any terminal that works for you.Here is the Serial Monitor that I’ve built back in the days (can’t remember how many years ago). I’ll be providing the source of it when it’s reworked as I’ll be working on a rework of it in the near future. It was written in C#, and you can build a similar one with python, java, etc. UART PC Interfacing – LABLab NamePC Control With USB-TTL ConverterLab Number19Lab LevelBeginnerLab ObjectivesLearn how to use the USB-TTL Converter module to convert serial data from the PC USB port to TTL UART which is compatible with almost all microcontrollers. Kode aktivasi foxit phantom pdf. Learn how to send/receive serial data to/from the PC from/to the microcontroller.1.
CodingOpen the MPLAB IDE and create a new project name it “PCControlUSB-TTL”. If you have some issues doing so, you can always refer to the previous tutorial using the link below.Set the configuration bits to match the generic setting which we’ve stated earlier. And if you also find troubles creating this file, you can always refer to the previous tutorial using the link below.Now, open the main.c file and let’s start developing the firmware for our project.The first task is to initialize the UART module in order to operate in the receiver (slave) mode. Then, we have to save all the coming data to a buffer variable.
The process of data reception and storage must be handled in the ISR as we’ve stated earlier.In the main while loop, we can check if the received byte matches a specific value or not. To take some action (Switch an LED ON/OFF & Toggle Another LED). However, we’ll be doing this job inside the ISR as it’s not an excessive processing task, so it’s OK to have it done inside the ISR whenever a data frame is received.The Full Code Listing For This LAB. Here is an animation for the running simulation tests.3. PrototypingWiring up this schematic on a breadboard should be an easy task. Just upload your firmware hex file to the microcontroller chip. And Open any serial terminal on your PC (the simplest way is to use the Arduino’s serial monitor).
Make sure to set the baud rate to 9600 bps. You can also use my old custom-made serial monitor. And here is a video for the final output of this LAB.If you’ve any troubles or got stuck at any point, just drop me a comment. I’ll be always here and ready for help. Or even other readers may do a better job in this.Concluding Remarks1The USB-TTL converter provides a very good yet easy to run solution for adding USB connectivity for your project.
However, it’s inherently limited in many aspects as it’s not a full USB port and it can’t replace a real USB hardware in many applications. But if you need a moderately low-speed USB communication, then go for it. The additional complexity of building a new USB stack from scratch may not align with the limited time-budget of a simple project if it’s the case for you.2You can build your own serial monitor with whichever language you prefer (i.e Java, C, Python, C#). Just search for a proper toolchain (toolkit) that supports building GUI applications (i.e QT for C,.NET for C#, PyQT for python, etc).Tutorial 20Next Tutorial.