element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Blog IDE ATA Hard Drive with ATmega328p MCU as Controller Question
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: iexpress
  • Date Created: 29 Dec 2014 8:33 PM Date Created
  • Views 3227 views
  • Likes 3 likes
  • Comments 6 comments
  • arduino
Related
Recommended

IDE ATA Hard Drive with ATmega328p MCU as Controller Question

iexpress
iexpress
29 Dec 2014

Hi All,

 

I tried to open a discussion but the website wouldn't publish it so I just created a quick blog about this project.

 

I was planning to make a quick IDE hard drive controller with an ATmega328p, and was wondering if anyone might know how the internal buffer addresses are incremented inside the hard drive during read/write operations?

 

Is there a set rate data has to be read from or written to the hard drive, or would the read/write pins be toggled to load the next set of 16 bit word during the read/write operations?

 

I'm a little confused, searching for tutorials, but they're not describing how the addresses are incremented, they're just saying read or write 512 bytes in one shot for either read or write sector operation.

 

Your help would be appreciated, thanks.

 

I know there are pre-written libraries, but I'll be interfacing this in a circuit of it's ow connected directly to an ATmega which will act solely as a dedicated IDE controller using the LBA access scheme.

  • Sign in to reply

Top Comments

  • muffenme
    muffenme over 11 years ago in reply to iexpress +1
    Did you read this An 8-bit IDE interface @ Retroleum Here some C program for PC Simplix - ide.c Finally I think someone made something for Arduino board this is it Paul's 8051 Code Library, IDE Hard Drive…
  • clem57
    clem57 over 11 years ago +1
    Originally I tried to access the hard drive using Cylinder/Head/Sector (CHS) addressing, and it would not work properly. All of these early attempts were with a Western Digital 1.2 gig drive. I could read…
  • clem57
    clem57 over 11 years ago in reply to iexpress +1
    Here is code I found to base what I know: ; Simple communication with an IDE disk drive ; see http://www.pjrc.com/tech/8051/ide/ for more info ; Modified, January 2005: ; - Update for rev 4/5 8051 development…
  • iexpress
    iexpress over 11 years ago

    After trying for a few hours, I managed to be able to read the first set of data after issuing read device id command.

    Still unsure what the sequence is to write sectors, but when I try to read a sector, it only hands me the first entry.

     

    In this screenshot, the last entry in the terminal shows as 0xED which is the lower 8 bits of the first entry of the Device ID command.

    Supposedly we're supposed to read the data from register 0, but when I go to toggle the Read pin and reselect the Read pin, all entries after that are 0xFF, as if the entire device is disabled.

     

    Any ideas what the proper sequence is for reading or writing to an IDE drive?

     

    Thanks.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube