ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Суббота
13 июля
454466 Топик полностью
Точка опоры (16.10.2013 16:08, просмотров: 88) ответил RED_DRAGON на если будет не трудно, ногодрыг.
Как-то так. Под AT90USB1287 раскладка выводов такая: ALE - A8/PC.0, CLE - A9/PC.1, !CE - PC.2, !WR и !RD - на те-же выводы, где интерфейс внешнего ОЗУ (!WR/PE.0, !RD/PE.1). Используются макросы AVR001 (store, load). .if debug == 555 // Тупо программно, для теста clr temp1 store xmcra,temp1 ldi temp1,0x03 store porte,temp1 ; !WR, !RD = 1 store ddre,temp1 ldi temp1,0x02 store portc,temp1 ; !CE=0, CLE=1 ldi temp1,0x07 store ddrc,temp1 ; !CE, ALE, CLE - outputs ldi temp1,0xFF store ddra,temp1 ldi temp1,0x90 store porta,temp1 ; porta = 90h cbi porte,PE0 ; !WR = 0 nop sbi porte,PE0 ; !WR = 1 cbi portc,PC1 ; CLE = 0 nop sbi portc,PC0 ; ALE = 1 ldi temp1,0x0 store porta,temp1 ; porta = 0h cbi porte,PE0 ; !WR = 0 nop sbi porte,PE0 ; !WR = 1 cbi portc,PC0 ; ALE = 0 ldi temp1,0x00 store ddra,temp1 ; porta - input nop cbi porte,PE1 ; !RD = 0 ldi temp1,0x10 do_read1: nop load u_data,pina rcall putc ; UART <- u_data dec temp1 brne do_read1 sbi porte,PE1 ; !RD = 1 nop nop nop cbi porte,PE1 ; !RD = 0 ldi temp1,0x10 do_read2: nop load u_data,pina rcall putc dec temp1 brne do_read2 sbi porte,PE1 ; !RD = 1 hang: rjmp hang .endif // debug == 555
Заказать импортные ЭК - https://shop.fulcrum.ru/buy