Page 1 of 1

initialize dma controller

Posted: Fri Jun 20, 2003 7:52 am
by HOS
Hi. I am trying to set up the dma controller to read a sector (512 bytes) from a floppy disk. Assuming all of the following steps are executed correctly, is this all i need to do to set up and begin to use the dma controller? or is there more that needs to be done?

1. enable dma controller
2. mask channel 2
3. reset flip-flop/byte counter
4. write byte0 (0x00) of starting address
5. write byte1 (0x00) of starting address
6. write byte2 (0x20) of starting address to page register of dma channel 2
7. reset flip-flop/byte counter
8. write byte0 (0xFF) of starting count
9. write byte1 (0x01) of starting count
10. initialize mode register for single read, auto-initialization dma
11. unmask channel 2

im not sure that this is working, are there any things to watch out for? how about interrupts? do they need to be disabled to do all of these steps?

Thanks!