구글검색 > AVR HDD interface project

TODAY1,955 TOTAL2,153,341
사이트 이용안내
Login▼/회원가입
최신글보기 질문게시판 기술자료 동영상강좌

아두이노 센서 ATMEGA128 PWM LED 초음파 AVR 블루투스 LCD UART 모터 적외선


BASIC4MCU | 구글검색 | IDE하드 | AVR HDD interface project

페이지 정보

작성자 키트 작성일2017-08-24 10:18 조회1,870회 댓글0건

본문

AVR HDD interface project


3660040653_GOvELBbd_avride.jpg

This project demonstrates the interface between an AVR ATMEGA32 and a IDE hard drive.
The source code accommodates both file and directory navigation creation and deletion. Both FAT16 and FAT32 (except long filenames at this stage) are supported.

Original work

The original sourceforge project by
Angelo Bannack and Giordano Bruno Wolaniuk
is located here using a ATMEGA128.

Port

This project is a ATMEGA32 port, the reason being that I wanted to build a system on veroboard. Thanks to the great structure of Angelo and Giordano's work I only had to changed two files, the makefile and main.c.

Please not that this project uses WinAVR 20040404 and not WinAVR 20060421. 
To compile the application download the older version of WinAVR here (12MB).

Main.c contains a test application with a terminal style RS232 interface.

Circuit diagram

Overview

Here is a low resolution diagram of the entire system.
A higher quality circuit diagram can be downloaded here (19KB).

3660040653_TYSC0hMJ_avride.gif

The system basically consists of a MEGA32, an IDE connector, a 232 level shifter and a power supply.
An ICP socket has been added but is not required.

CPU up close

3660040653_iMR0lXg2_cpu.gif

Note that I used a 4MHz crystal in stead of the recommended 16MHz. At 16MHz the AVR is simply to fast for some older drives. Simply adding NOP statements where they were originally inserted was not enough. Timing boundaries are exceeded in other places. Further investigation as to where to add delays is required. If you are however using a "modern" drive with at least ATA66 and LBA, 16Mhz should be fine.

IDE

3660040653_q3pyjZvB_ide.gif

The IDE interface remains unchanged from the original. A simple CPU port and PSU connection.

Serial Interface


3660040653_fX7BshCc_serial.gif

The serial port interface consists of a RS232 converter and a IDC10 type box header. The IDC10 simplifies connectivity, as a DB9..ribbon..IDC10 cable was used. The only drawback is the rather unusual TX,RX and GND pin numbers.

PSU,RST and ICP

3660040653_Gb7MvL0w_psu.gif


There's nothing special about the power supply, except that the hard drive's 5V is not to be drawn from VCC ( the currents are just to high for a 7805 ).
One could use the 5V HDD supply to feed the circuit, but that comes from a high current power supply. Any PSU related bugs in your prototype might then result in burned tracks!

Vin is the +12V that feeds the HDD.
The ICP(In Circuit Programming) port used is the ATMEL standard while the reset circuitry is a simple RC type.

I programmed my device using the SP12 programmer. The 100nF load on the reset doesn't seem to affect the programmer.


Firmware.

Download (714KB) the entire MEGA32 compatible project and the original documentation.
Download (685KB) the code that this port was based on.
Note that the only files that has changed for the MEGA32 version is the makefile and main.c.

Serial setup.

28800 baud. (when running on a 4MHz crystal)
115200 baud. (when running on a 16MHz crystal)
1 stop bit.
0 parity bits.
Full duplex
 

댓글 0

조회수 1,870

등록된 댓글이 없습니다.

구글검색HOME > 구글검색 > 전체 목록

게시물 검색

2022년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2021년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2020년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2019년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2018년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
Privacy Policy
MCU BASIC ⓒ 2020
모바일버전으로보기