?
Solved

ISP using the 89C51RE2 not the same as the 89C51RD2

Posted on 2011-02-22
8
Medium Priority
?
940 Views
Last Modified: 2013-12-10
Hello Experts.
I've been charged with the task of programming a 89C51RE2 via the bootloader ISP interface. I have done this already for the 89C51RD2 with no problems.
The RE2 does things differently, in a way I don't understand. I'd like a nudge in the right direction please. Google hasn't helped me at all.

For instance to read the FLASH memory from address 0x7E00 to 0x7E20 on the RD2 I'd use the following command:
":05000004FE00FE2000DB"

Open in new window

What would be the equivalent command for the RE2?

To write 0x01 to address 0x7E00 on the RD2 I'd use:
":017E00000180"

Open in new window

What would be the equivalent command for the RE2?

Many thanks
Andy
0
Comment
Question by:RocksOfSteel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 69

Expert Comment

by:Callandor
ID: 34957523
Are you asking for a utility, or a specific language?  According to this http://www.keil.com/support/docs/2292.htm, FLIP from Atmel http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3886 should let you program the RD2.  If you're asking for specific machine instructions, sorry, I don't know that answer.
0
 

Author Comment

by:RocksOfSteel
ID: 34958621
I'm not asking for a utility, I want do write my own.  And it's the RE2 solution I'm after, I can already do the RD2. The RE2 is 128k so the solution has something to do with selecting the right memory page to write to (or read from). But I can find no reference to how to do it.

0
 
LVL 69

Expert Comment

by:Callandor
ID: 34966471
Take a look at this thread: http://www.keil.com/forum/16348/ - someone is asking how to program the 89C51RE2 using KEILuvision4.

A different approach might be to compile a program using a higher-level language (http://www.keil.com/support/man/docs/c51/c51_le_memtypes.htm) and look at the code it generates.

Programming in machine language is a lost art these days.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:RocksOfSteel
ID: 34967934
Hi Callandor,

Programming in machine language is a lost art these days.
I think you've misunderstood what I'm trying to do. I don't want to write to flash via code in the µP. I want to write to FLASH memory externally using the built in Bootloader and ISP (In-system-programming) via RS232 from a PC.
As I said, I've cracked it using the RD2 but not the RE2 (128k version).

The command strings in my original question are sent to the µ over RS232 after the PSEN has been pulled low.
0
 
LVL 69

Expert Comment

by:Callandor
ID: 34976341
Ok, then I am unable to provide any more info along those lines.  Hopefully, someone with the right knowledge will be able to pick this up.
0
 

Author Comment

by:RocksOfSteel
ID: 34978922
Thanks Callandor,
I have a solution, I'll update here on Monday.
0
 

Accepted Solution

by:
RocksOfSteel earned 0 total points
ID: 35008281
Ok,
It's straight forward really. You have to select the memory page first.

So to write to an address between 0 and 7FFF:
Using the RC2/RD2 you send the following sting (without spaces):
":05 0000 04 FE00 FE20 00 DB"
where:
05 is the number of data elements.
0000 is an offset and is always zero.
04 is the read command
FE00 is the start address
FE20 is the final address
00 is always zero
DB is the Checksum

The same command is true on the RE2 but before you send it you must select the page. In the above case the page is page 0.
":02 0000 04 00 00 FA"
Where:
02 is the number of data elements.
0000 is an offset and is always zero.
04 is the record type (Select memory)
FE00 is the start address
FE20 is the final address
00 is FLASH memory
00 is page 0 (01 would be page 1)
FA is the Checksum

Hope this helps anyone in the same predicament as I found myself in.
0
 

Author Closing Comment

by:RocksOfSteel
ID: 35045519
I have excepted my own comment as the solution because I found the solution myself be snooping on the RS232 lines while Atmel's FLIP programmer did it's thing.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More and more people are using the enhanced small form-factor pluggable (SFP+) tranceivers, and speed is of utmost importance. Testing of speeds are critical to ensure that the devices will meet the speed requirements. There are some testing challen…
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question