AMcTools Forum 
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Can't i read ICR1 register of AT90S2313-10PI? (Read 9051 times)
DreamCat
Junior Member
**
Offline

I love electronic!

Posts: 63

Can't i read ICR1 register of AT90S2313-10PI?
11/22/09 at 03:48:41
 
I use avr-gcc (newest version) access ICR1 register of AT90S2313-10PI. compiled success, but when i simulate in VMLAB, it told me "[PC = $003D, Time =   82.43 ms, {MEM}]: Attempt to read in a forbidden/reserved position", its ASM code is "in    R24, $24" , and "in    R24, $25", I saw the AT902313's datasheet, no wrong in there.

I can saw the value of ICR1 on peripherals of VMLAB, but can't read , why??

I'm using 16 bit T/C input capture mode. should I need config other register first???

I change MCU to ATMEGA16L, it worked nice, no problem....
Back to top
 
 
  IP Logged
moderator
YaBB Administrator
*****
Offline

I love forums, don't
you?

Posts: 308
AMcTools (Spain)
Gender: male
Re: Can't i read ICR1 register of AT90S2313-10PI?
Reply #1 - 11/22/09 at 12:41:52
 
Hmmmm, this seems to be a VMLAB bug....

I see that the input capture registers are located in positions $46, $47, instead of $45, $46... I ignore why it is like this, since no report about has ever arrived. Maybe some side effect of new release; we have to investigate.

Provisional solution to allow simulation, till it is fixed:

-Redefine the GCC defined positions as the ones of VMLAB, so this will allow you simulate.

- Before burning your flash, restore positions as they must be and recompile.

You can make some conditional compilation, etc.
Back to top
 
 
WWW   IP Logged
DreamCat
Junior Member
**
Offline

I love electronic!

Posts: 63

Re: Can't i read ICR1 register of AT90S2313-10PI?
Reply #2 - 11/22/09 at 13:12:57
 
thanks your reply!

I will try it, but now i read another register "TCNT1" to instead in this exercise. just waste a few clock.

by the way, can we translate VMLAB program to chinese? if you agree, it's a happy thing for many user.  What is the date of the next version will be released ?
Back to top
 
 
  IP Logged
moderator
YaBB Administrator
*****
Offline

I love forums, don't
you?

Posts: 308
AMcTools (Spain)
Gender: male
Re: Can't i read ICR1 register of AT90S2313-10PI?
Reply #3 - 11/22/09 at 15:40:47
 
The language translation is not an easy job...

VMLAB is not configured for the moment with a multi-language option  (by choosing a DLL, for example)

But if you have some tool that locates the strings in the EXE and change them..... go ahead!  Just, this is very dangerous job... :o

About next public release, I cannot yet give you a date...
Back to top
 
 
WWW   IP Logged
DreamCat
Junior Member
**
Offline

I love electronic!

Posts: 63

Re: Can't i read ICR1 register of AT90S2313-10PI?
Reply #4 - 11/22/09 at 16:22:41
 
;D
there is many tools can do this work. just need a lot of word need to translate..
one of my friend will done it, I have no time. just provide little help to translate some word..

thanks for your agree!
Back to top
 
 
  IP Logged
moderator
YaBB Administrator
*****
Offline

I love forums, don't
you?

Posts: 308
AMcTools (Spain)
Gender: male
Re: Can't i read ICR1 register of AT90S2313-10PI?
Reply #5 - 11/22/09 at 17:32:25
 
OK....

I haven't ever used such tools; I know there has been some VMLAB translation in Russian, but no idea about how it was done.

Just they must  take into account to keep string max lenghts and respect formatting stuff in strings "%d %X"....  A minimum mistake here will cause a crash!  :-/

Once you (or your colleagues) has done the job and tested it, we can put a link to your donwload site. But ovbiously, the VMLAB support in Chinesse is also your job; we can open a forum section in this language, if needed.
Back to top
 
 
WWW   IP Logged
ThVortex
Global Moderator
*****
Offline



Posts: 160
Austin, TX, USA
Gender: male
Re: Can't i read ICR1 register of AT90S2313-10PI?
Reply #6 - 11/23/09 at 00:51:55
 
The menus and dialog boxes in VMLAB are Windows resources so they are easy to modify using something like [url=http://angusj.com/resourcehacker/]Resource Hacker[/url] (which itself has a Chinese translation, coincidentally). I wouldn't recommend editing strings directly in the executable because each time a new VMLAB version comes out, then someone has to go through and change all the strings again in the new version.

If we're serious about doing a translation, then all the internal strings in VMLAB should go into a string table resource and any translations should be permanently included into the VMLAB project files. Windows allows multiple language versions of all the resources so a single .EXE file can hold all the versions.

I believe VMLAB is compiled in ANSI mode and not Unicode so when editing the resources, make sure you're also running on a Chinese version of Windows (so you're editing resources under the same code page that VMLAB will run in). If using Windows XP (or newer), then the [url=http://www.microsoft.com/globaldev/tools/apploc.mspx]AppLocale[/url] utility can also be used to force VMLAB or the resource editor to run under a different locale then the global system locale.
Back to top
 
 
WWW   IP Logged
DreamCat
Junior Member
**
Offline

I love electronic!

Posts: 63

Re: Can't i read ICR1 register of AT90S2313-10PI?
Reply #7 - 11/23/09 at 11:16:47
 
we have done a part of translate work. it worked nice.

thanks ThVortex's advice!

a happy thing want to told you, I made a 8 channel IR Remote switch us AT90S2313, this is my first AVR device.   :D, since help from the VMLAB, i just do a little modify in my program...

next i will learn the PWM and A/D, hope to do a D class AMP... of cause,  simulate in VMLAB first!

thanks all of you ... ;D
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print