Mudanças entre as edições de "Microcontroladores"
Ir para navegação
Ir para pesquisar
Linha 5: | Linha 5: | ||
http://www.ebah.com.br/content/ABAAAA8T8AK/microcontrolador-8051 | http://www.ebah.com.br/content/ABAAAA8T8AK/microcontrolador-8051 | ||
+ | |||
+ | = Implementações em Assembly no MIC 8051 = | ||
+ | |||
+ | Zerando área de memória de 50h até 7Fh | ||
+ | { | ||
+ | mov A,50h | ||
+ | |||
+ | loop: | ||
+ | mov R0,A | ||
+ | mov @R0,#00 | ||
+ | inc A | ||
+ | cjne R0,7Fh,loop | ||
+ | loop2: | ||
+ | jmp loop2 | ||
+ | |||
+ | } | ||
+ | |||
+ | Contador em painel LED Alfanumérico | ||
+ | // Faltam os temporizadores ainda não entendi como funcionam, estou trabalhando nisso | ||
+ | |||
+ | loop: | ||
+ | setb P1.1 | ||
+ | CLR P2.1 | ||
+ | CLR P3.1 | ||
+ | CLR P0.1 | ||
+ | CLR P1.2 | ||
+ | CLR P2.2 | ||
+ | CLR P3.2 | ||
+ | |||
+ | setb P0.1 | ||
+ | setb P2.1 | ||
+ | setb P3.1 | ||
+ | setb P3.2 | ||
+ | |||
+ | |||
+ | |||
+ | setb P2.2 | ||
+ | CLR P0.1 | ||
+ | CLR P1.1 | ||
+ | CLR P3.1 | ||
+ | CLR P3.2 | ||
+ | |||
+ | |||
+ | |||
+ | setb P3.1 | ||
+ | CLR P2.2 | ||
+ | |||
+ | setb P0.1 | ||
+ | setb P3.2 | ||
+ | CLR P2.1 | ||
+ | |||
+ | setb P1.2 | ||
+ | CLR P0.1 | ||
+ | CLR P3.2 | ||
+ | |||
+ | CLR P3.1 | ||
+ | |||
+ | setb P1.1 | ||
+ | setb P2.1 | ||
+ | setb P3.1 | ||
+ | setb P3.2 | ||
+ | CLR P1.2 | ||
+ | |||
+ | |||
+ | CLR P1.1 | ||
+ | CLR P2.1 | ||
+ | CLR P3.1 | ||
+ | CLR P3.2 | ||
+ | |||
+ | setb P3.1 | ||
+ | |||
+ | jmp loop |
Edição das 13h56min de 12 de maio de 2013
Bibliografia sobre Microcontroladores
http://www.ebah.com.br/content/ABAAAA8T8AK/microcontrolador-8051
Implementações em Assembly no MIC 8051
Zerando área de memória de 50h até 7Fh { mov A,50h
loop:
mov R0,A mov @R0,#00 inc A cjne R0,7Fh,loop loop2: jmp loop2
}
Contador em painel LED Alfanumérico // Faltam os temporizadores ainda não entendi como funcionam, estou trabalhando nisso
loop: setb P1.1 CLR P2.1 CLR P3.1 CLR P0.1 CLR P1.2 CLR P2.2 CLR P3.2
setb P0.1 setb P2.1 setb P3.1 setb P3.2
setb P2.2 CLR P0.1 CLR P1.1 CLR P3.1 CLR P3.2
setb P3.1 CLR P2.2
setb P0.1 setb P3.2 CLR P2.1
setb P1.2 CLR P0.1 CLR P3.2
CLR P3.1
setb P1.1 setb P2.1 setb P3.1 setb P3.2 CLR P1.2
CLR P1.1
CLR P2.1
CLR P3.1
CLR P3.2
setb P3.1
jmp loop