Continue to Site

Welcome to EDAboard.com

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.

No Digital Oscilloscope changes on proteus

himam

Newbie
Newbie level 1
Joined
Feb 21, 2024
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
18
I can't get any changes on digital oscillation changes on my atmega8515.
Here is my assembly code,
Code:
;**********************************************************************
;Ïðîãðàììà 1.1 äëÿ ìèêðîêîíòðîëëåðîâ ATx8515:
;ïåðåêëþ÷åíèå ñâåòîäèîäîâ (ÑÄ) ïðè íàæàòèè íà êíîïêó START (SW0),
;ïîñëå íàæàòèÿ êíîïêè STOP (SW1) ïåðåêëþ÷åíèå ïðåêðàùàåòñÿ è
;âîçîáíîâëÿåòñÿ c ìåñòà îñòàíîâêè ïðè ïîâòîðíîì íàæàòèè íà êíîïêó START
;Ñîåäèíåíèÿ: SW0-PD0, SW1-PD1, LED-PB
;**********************************************************************
;.include "8515def.inc"            ;ôàéë îïðåäåëåíèé äëÿ AT90S8515
.include "m8515def.inc"            ;ôàéë îïðåäåëåíèé äëÿ ATmega8515
.def temp = r16                    ;âðåìåííûé ðåãèñòð
.def reg_led = r20                ; ðåãèñòð ñîñòîÿíèÿ ñâåòîäèîäîâ
.equ START = 0                    ;0-é ðàçðÿä ïîðòà
.equ STOP = 1                    ;1-é ðàçðÿä ïîðòà
.org $000
        rjmp init
INIT:    ldi reg_led,0xFE     ;ñáðîñ reg_led.0 äëÿ âêëþ÷åíèÿ LED0
        sec                    ;C=1
        set                    ;T=1 – ôëàã íàïðàâëåíèÿ
        ser temp            ;èíèöèàëèçàöèÿ
        out DDRB,temp        ; ïîðòà PB íà âûâîä
        out PORTB,temp        ;ïîãàñèòü ÑÄ
        clr temp            ;èíèöèàëèçàöèÿ
        out DDRD,temp        ; ïîðòà PD íà ââîä
        ldi temp,0x03        ;âêëþ÷åíèå ïîäòÿãèâàþùèõ
        out PORTD,temp        ; ðåçèñòîðîâ ïîðòà PD 
WAITSTART:                    ;îæèäàíèå
        sbic PIND,START        ; íàæàòèÿ
        rjmp WAITSTART        ; êíîïêè START
LOOP:    out PORTB,reg_led    ;âêëþ÷åíèå ÑÄ
        ldi r16,11
d0:        ldi r17,237
d1:        ldi r18,255
d2:        dec r18
        brne d2
           dec r17
        brne d1
        dec r16
        brne d0
        sbic PIND,STOP        ;åñëè çàìêíóòà êíîïêà STOP, òî
        rjmp MM                ; ïåðåõîä
        rjmp WAITSTART        ; äëÿ ïðîâåðêè êíîïêè START,
MM:        brts LEFT            ;ïåðåõîä, åñëè ôëàã T óñòàíîâëåí
        sbrs reg_led,0     
        set                    ;T=1 - ïåðåêëþ÷åíèå ôëàãà íàïðàâëåíèÿ
        ror reg_led            ;ñäâèã reg_led âïðàâî íà 1 ðàçðÿä
        rjmp LOOP         
LEFT:    sbrs reg_led,7     
        clt                    ;T=0 – ïåðåêëþ÷åíèå ôëàãà íàïðàâëåíèÿ
        rol reg_led            ;ñäâèã reg_led âëåâî íà 1 ðàçðÿä
        rjmp LOOP

ibb.co/Mk2MGg1


I attached screen shots
--- Updated ---

Here is screenshot
 

Attachments

  • imgonline-com-ua-twotoone-uFM8il3NpVG.jpg
    imgonline-com-ua-twotoone-uFM8il3NpVG.jpg
    967.5 KB · Views: 109
Last edited by a moderator:
Hello!

When asking something, you may consider saying hello, please, thank you, etc...
Beside this, you could also explain what exactly you want to do.
You say:
I can't get any changes on digital oscillation changes on my atmega8515.
Getting changes on the changes, is not obvious to me. Do you mean you can't write
to the output ports?
Next, the code you post looks like this:
Screenshot 2024-02-22 at 9.09.24.png

I understand START, STOP, SW0 / SW1, but that's about it. So another good practice if you
post to mostly english forum is to comment your code in english.

So explain first, if possible politely, and you might "get" more answers.

Dora.
 

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top