Ata Posted October 25, 2012 Share Posted October 25, 2012 Buna ziua.Am urmatorul asm si doresc sa schimb intrarea: RB0 cu RB6 .Unde trebuie sa mai modific in afara de: BSF PORTB,0 ; !!Bank!! PORTB - TRISB - PORTB - TRISB Asa am schimbat: BSF PORTB,6 ; !!Bank!! PORTB - TRISB - PORTB - TRISBdar mai trebuie undeva. Unde?.Multumesc. CDI.txt Link to comment Share on other sites More sharing options...
sofian Posted October 25, 2012 Share Posted October 25, 2012 trebuie sa urmaresti programul ca sa schimbidezasamblorul nu stie daca este bank0/1 si te atentioneazadaca este bank1 este registru care face RB6 intrare sau iesire Link to comment Share on other sites More sharing options...
costi002 Posted October 25, 2012 Share Posted October 25, 2012 cred ca poti folosi cu succes functia replace din editor. pui sa caute portb,0 si sa inlocuiasca cu portb,6 Link to comment Share on other sites More sharing options...
Ata Posted October 25, 2012 Author Share Posted October 25, 2012 Mentionez ca programul functioneaza, chiar daca da atentionari la asamblare, le da poate ca dupa ce este scris in hex, in montaj, prin bootloader se adauga date .Asa am vrut dar PORTB,0 nu este decat intr-un loc. Link to comment Share on other sites More sharing options...
MatyC Posted October 26, 2012 Share Posted October 26, 2012 Cu PortX,Y stabilesti starea acelui pin (0 sau 1) insa inainte de modificare cu comanda TRIS configurezi acel pin ca intrare sau iesire. Link to comment Share on other sites More sharing options...
Ata Posted October 26, 2012 Author Share Posted October 26, 2012 In asmul asta, apare TRIS doar ca specificatie, inseamna ca este scris in alt fel. Am incercat asa: movlw B'11000011' ; bit 2,3,4,5 = o/p's, 0,1,6,7 = i/p's movwf TRISB ; set portB ;===================== BCF PORTA,0 ; !!Bank!! PORTA - TRISA - Unimplemented - Unimplemented BSF PORTA,1 ; !!Bank!! PORTA - TRISA - -----10K + ---- programare BCF PORTA,2 ; !!Bank!! PORTA - TRISA - Unimplemented - Unimplemented BCF PORTA,3 ; !!Bank!! PORTA - TRISA - Unimplemented - Unimplemented BCF PORTA,4 ; !!Bank!! PORTA - TRISA - Unimplemented - Unimplemented BSF PORTB,7 ; !!Bank!! PORTB - TRISB - PORTB - TRISB - 6 mutat pe 13 -pickup BCF PORTB,3 ; !!Bank!! PORTB - TRISB - PORTB - TRISB - 9 -30Khz-??? BCF PORTB,4 ; !!Bank!! PORTB - TRISB - PORTB - TRISB - 10-Output Scr-Igbt BCF PORTB,5 ; !!Bank!! PORTB - TRISB - PORTB - TRISB - 11-Lednu merge. Link to comment Share on other sites More sharing options...
10vid Posted October 26, 2012 Share Posted October 26, 2012 Din ce-am vazut, pinii RB0 si RB6 nu sunt folositi de program. Ce rost are sa-i schimbi intre ei? Link to comment Share on other sites More sharing options...
Ata Posted October 26, 2012 Author Share Posted October 26, 2012 In fisierul atasat este RB,0. In postul de mai sus am facut eu o schimbare ca sa incerc. L-am inlocuit cu 7.Pin 6 defect. Link to comment Share on other sites More sharing options...
10vid Posted October 26, 2012 Share Posted October 26, 2012 Mai bine ai pune aici hexul original, nu cel modificat. Link to comment Share on other sites More sharing options...
Ata Posted October 27, 2012 Author Share Posted October 27, 2012 Atasez originalul. HEX-G1.zip Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.