PIC-ATA project-Anything similar? - Page 1
Forum section: electronics / general

author: djsb
author_rank: Super Contributor
timestamp: November 11, 2023, 05:42:26 pm
content: I've just thought it might be useful as an exercise (in hardware and XC8 programming of a PIC18F452 or later) to make use of an old 160GB Ultra ATA hard drive. I found this old project from 2015. The email I sent bounced, so that is unfortunate.http://www.edlangley.co.uk/projects/picmicro-ata-lib/And code.https://github.com/edlangley/PIC-ATAI've retrieved the Eagle schematic and imported into KiCad V7.09 (pdf attached).This page gives details of the 44 pin layout for a 2.5 inch drive (the above is for a 3.5 inch drive). I will firstly need to check the schematic against the 44 pin layout.I'm just wondering if there is anything more recent out there that I've missed? Any obvious mistakes (apart from the PIC not being labelled as a PIC16F877)?

author: fchk
author_rank: Frequent Contributor
timestamp: November 12, 2023, 11:04:39 am
content: I would use a more modern PIC:https://www.microchip.com/en-us/product/pic24fj256gb206.This would allow you to interface the whole device via USB to a PC. The IDE interface would use the EPMP (Enhanced Parallel Master Port) of the PIC24, which would speed up things a lot. Yes, there is DMA support as well. And the whole PIC is 16 bit - many IDE devices need 16 bit access.You would need level shifters though. Recommendation: 74LVC8T245.fchk

author: djsb
author_rank: Super Contributor
timestamp: November 12, 2023, 05:27:21 pm
content: Would the 74LVC8T245 be used in between the 8255 pins and the PIC24FJ256GB206 as I'm assuming this PIC has 3.3v pins only?

author: fchk
author_rank: Frequent Contributor
timestamp: November 12, 2023, 05:58:10 pm
content: you won't need the 8255 any more. This PIC has enough pins (64 pins) to talk directly to the ATA drive, and if not, than there is a 100 pin version as well (...GB210). Not using the 8255 will make things easier and faster as well.This PIC uses 3.3V levels, IDE/ATA uses 5V levels, so you need translators. The 74LVC8T245 works similar to a basic 74HC245 with the bonus that each side has its own VCC. DIR and !OE belong to VCCA.

author: djsb
author_rank: Super Contributor
timestamp: November 13, 2023, 03:21:23 pm
content: How about a PIC32MX795F512L (https://www.microchip.com/en-us/product/pic32mx795f512l)?https://ww1.microchip.com/downloads/aemDocuments/documents/MCU32/ProductDocuments/DataSheets/PIC32MX5XX6XX7XX_Family%29Datasheet_DS60001156K.pdfI recently bought an Olimex PIC32-MAXI-WEB Dev board (https://www.olimex.com/Products/PIC/Development/PIC32-MAXI-WEB/) May as well make use of it if it has the pins that I need free.

author: fchk
author_rank: Frequent Contributor
timestamp: November 13, 2023, 06:23:50 pm
content: Quote from: djsb on November 13, 2023, 03:21:23 pmIf you need Ethernet this might be an alternative. PIC32 is better if your tasks heavily use 32 bit values or are computational intensive. If your workload is io intensive and your data types are mainly 16 bit then PIC24/dsPIC33 are more efficient. PIC32 are MIPS, and the MIPS interfaces via asynchronous busses to the rest of the chip, which are significant slower than the internal cpu clock. PIC24 and dsPIC have a Microchip core that is tightly integrated with the rest of the chip, which is better for io.Quote from: djsb on November 13, 2023, 03:21:23 pmWon't work. The PMP is occupied by the LCD, and you are missing address lines as well as the second CS line. You will have to start with a blank schematic sheet, place the naked PIC24 controller chip and connect the required EPMP lines to the IDE port via the level shifters.