Hello. My name is Rosen Andonov, I'm from Bulgaria.. 26 years old ...
I need a little help about programming on assembler. In my country noone understand assembler... only my teachers in school ... but i have a test for this... and i dont know who to ask for help about my problems. I'm sorry about my english language .. it's poor but i hope understanding me. I need help for this:

I have a source code on program programmed to work with chip model: "AT90S2313" This source code must be modifyed to work normally for similar chip model: "?TTINY2313"

If the program not work on simulator .. dont worry, that's normal (that say some peoples.. but they may wrong, i dont know)
I have some saved money .. and if needs.. i can pay for that help if needs.

--------------------------------------------------------------
Source code links:
http://akota.hit.bg/90S.rar
or
http://rapidshare.com/files/372327469/90S.rar.html
or
http://www.megaupload.com/?d=YV1HJFRX
--------------------------------------------------------------
If anyone have any question about this ... i'll be glad to answer

Thank you !
Kind Regards! - R.Andonov
Posted on 2010-04-05 11:37:12 by Lander
These 2 chips are core-compatible, IIRC. The only thing you need to change is the addresses of ports so that the code addresses correct peripherial devices.

I'm from Bulgaria.. (...) In my country noone understand assembler...

Oh, come on - I know of at least 1 Bulgarian ASM expert ;)
Posted on 2010-04-05 17:18:30 by ti_mo_n
ti_mo_n: Lingo is also Bulgarian, it seems, btw :)

Anyway, checked the datasheets of both, the IO ports are in the same locations 20h ..5Fh,  so the problem is elsewhere. Fortunately, there is a PDF to specifically aid your problem:
AVR091: Replacing AT90S2313 by ATtiny2313 :  http://www.atmel.com/dyn/resources/prod_documents/doc4298.pdf

I haven't touched Atmel stuff, got suckered into PIC and others, but I might manage to help over MSN.
Posted on 2010-04-06 02:45:04 by Ultrano
Thank you for this information !!!
Posted on 2010-04-06 11:02:38 by Lander

ti_mo_n: Lingo is also Bulgarian, it seems, btw :)

Anyway, checked the datasheets of both, the IO ports are in the same locations 20h ..5Fh,  so the problem is elsewhere. Fortunately, there is a PDF to specifically aid your problem:
AVR091: Replacing AT90S2313 by ATtiny2313 :  http://www.atmel.com/dyn/resources/prod_documents/doc4298.pdf

I haven't touched Atmel stuff, got suckered into PIC and others, but I might manage to help over MSN.

Do you know how to make contact with lingo12 ? i'm unable to send perosnal messages :/
Posted on 2010-04-06 11:11:32 by Lander
His profile shows his public email is lingo12 <pri> operamail <to4ka> com .

No ti mai ne razbra 4e i az sum bulgarin :) .
Posted on 2010-04-06 11:18:46 by Ultrano

His profile shows his public email is lingo12 <pri> operamail <to4ka> com .

No ti mai ne razbra 4e i az sum bulgarin :) .

Nqma kak da razbera, no za poreden pat se ocharovam ot nashite :) Gordeq se, 4e chast ot nai-golemite specialisti sa bulgarite :) Postnah syobshtenie na kirilica, koeto nemoje da se prochete dori i ot men.. mojesh da go iztriesh. No .. naistina imam nujda ot pomosht, bih platil kakwoto e nuvno za tazi programka i ako sluchaino namerish svobodno vreme .. molq te pishi mi, shte nabludavam foruma 24/7 ako e nujno.

Blagodarq !

Kind Reagrs! R.Andonov
Posted on 2010-04-06 11:44:30 by Lander
Oks, my MSN-messenger/email is  ultrano <pri> hotmail <to4ka> com . We could tackle the problem quickly there without the language barrier, and then post here what the met problems and their solution were; for future reference.

Still, if there's anyone from the forum with AVR experience, tips are welcome :)
Posted on 2010-04-06 12:01:02 by Ultrano
Hello Lander

Here is an application note (guide) to help current AT90S2313 users convert existing designs to ATtiny2313.
I did include the includefiles for the AT90S2313 and ATtiny2313.
Do you use AVR studio to compile your stuff ?

edit: sorry Ultrano already gave you a link to the doc4298.pdf
Attachments:
Posted on 2010-04-07 01:31:27 by Siekmanski

Hello Lander

Here is an application note (guide) to help current AT90S2313 users convert existing designs to ATtiny2313.
I did include the includefiles for the AT90S2313 and ATtiny2313.
Do you use AVR studio to compile your stuff ?

edit: sorry Ultrano already gave you a link to the doc4298.pdf

Yes, i have AVR studio to compile my stuff .. but .. the problem is .. i'm unable to change processors even i have this PDF, becouse i'm not understand .. i'm ready to pay for this job to someone who can do it for me :/
Posted on 2010-04-07 10:52:25 by Lander
Hello Lander

I made a start at it, for you to continue....
I don't have your circuitboard here so I can't test it.

Just compare all the differences between de include files and then make
the changes to the disassembly file.


.include <tn2313def.inc>    ; ATtiny2313 definition file

.equ F_CPU  = 16000000  ; put your Xtal frequency here
.equ DESET  = 0x0A     
.equ STO20  = 0x78     

.CSEG

.org 0x0000    ; adres 0x0000
    rjmp    avr002A    ; jump to Start
.org INT0addr    ; External Interrupt Request 0
    rjmp    avr0359
.org INT1addr    ; External Interrupt Request 1
    rjmp    avr035A
.org OVF0addr    ; Timer/Counter0 Overflow
    rjmp    avr0380
.org URXCaddr    ; USART, Rx Complete
    rjmp    avr03AD

; all avr037F are jumps to reti and not needed because the use of org

.org INT_VECTORS_SIZE    ; jump over Interrupt Vectors


;Start
avr002A:
    ldi    r24,low(RAMEND)        ; Init STACK (RAMEND == 0xDF)
    out    SPL,r24
    rcall  sub03D0
    sbis  PIND, 2
    rjmp  avr0043
    lds    r24, SRAM_START        ; (SRAM_START == 0x0060)
    lds    r25, SRAM_START+1
    adiw  r24, 0x01
    sts    SRAM_START, r24
    sts    SRAM_START+1, r25
    lds    r24, SRAM_START+2
    cpi    r24, 0x5D
    breq  avr0012
    ldi    r24, 0x5D
    sts    SRAM_START+2, r24
    ldi    r16, DESET
    sbi    PORTB, 7
    rjmp  avr0012
    nop
avr0043:

Posted on 2010-04-08 03:47:24 by Siekmanski