Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
hai
you can directly write the programe in keil and debug it very easly.in keil demo version the maximum limit to build a project is 2k. if your program size is small, you can try using assembly language in keil itself. you may be knowing that the hex files created from assembly will be small compared to tht in c. but assembly is a little harder than c.
when i download a program from chip and upload it there is no problem, when i use TASM compiler , there is no problem , but when i compile with Keil .....( it give me error,
Turbo can work with bin file becous when i dowload a program from IC he is in bynary format
Added after 14 minutes:
HERE IS THE SOURCE OF MY PROGRAM
it control some LED's ot Port 3
---------------------------------------------
#include <reg51.h>
int xl = 100;
unsigned int led_table[] = {
0x1,0x2,0x4,0x8,0x10,0x20,0x40,0x80,
0x40,0x20,0x10,0x8,0x4,0x2,0x1,0x0};
unsigned int led_table2[] = {
0x1,0x3,0x7,0xF,0x1F,0x3F,0x7F,0xFF,
0x7F,0x3F,0x1F,0xF,0x7,0x3,0x1,0x0};
I ask you to upload the hex file because I suspect some kind of weird format or checksum errors (why always stops at adress 0x0100).
But I found none. The hex file it's OK. Your keil program is compiled starting with 0x0000 and not 0x0800 (evaluation)
I didn't check the C program only the hex file, thus I don't know if will run or not once downloaded into chip.
You said that the programmer is able to program the AT89C51 with whatever hex file downloaded from net and easy cross beyond address 0x0100 when programming AT89C51.
That was the main reason for which you suspect is something wrong with the hex file generated by keil.
Hope my assumptions are correct.
According to your hex file the size of the program is 422 bytes (address 0x0000 - 0x01A5).
The flash memory program of AT89C51 has 4096 bytes (address 0x0000 - 0x0FFF).
Well what I don't understand and I don't say that is the reason for which you're not able to program now the chip, but looking at your picture why turbo6 programmer shows a size file of 1260 bytes (0x04EC)
Same values for chip and buffer.
What means ROM: 30 and Buffer: 34 ?
The programmer is expecting 34 hex according to his buffer and received 30 hex from ROM (AT89C51) thus writing errors ?
But why, because at address 0x0100 in your hex file is data 04 hex.
However try to use the bellow binary file converted from your hex file.
If you already check program starting at offset 0x0800 and programmer stops at 0x0900 then I believe it's not a physical location damaged inside the AT89C51.
How can i reduce the RAM memory in C, it take me Error when my Data is up to 11.0->. I use for const "Code" memory , but when put sub routine in 2-3 level
asdasdasd{
asdasdas{
asdasdas{}
}
}
this type incraze my data memory , how can i put validate memory to forgot trouble
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.