Surly the easiest thing for you to do would be to get a 18f4620 (like
I use), and I can send over a .hex file if you want. I am using jal
2.4n (compiled Jun  2 2010). After you get it working, go back and see
what was wrong in the first place.

Your line "until count1 == 0 " comes to my attention since count1 is a
word variable, not a byte.

Matt.

On Oct 23, 2:25 am, Oliver Seitz <[email protected]> wrote:
> > I may be confused. are you having trouble with fat32 or the
> > hard disk
> > lib? What loop are you stuck in?
>
> The problem is in the pata lib... or in the compiler or in my PICs :-)
>
> For debugging I've done some additions and modifications to 
> pata_hd_read_sector_address()
>
>          var byte count1=0
>
>          repeat
>             -- get the data trough the ide interface
>   print_byte_dec(serial_hw_data,count1)
>   serial_hw_data="a"
>             pata_hd_iord = high ^ PATA_HD_NO_INVERTER  -- start read pulse 
> such
>   serial_hw_data="b"
>             pata_hd_delay_100ns()
>   serial_hw_data="c"
>             pata_hd_sector_buffer_low[count1] = pata_hd_data_low  -- get low 
> da
>   serial_hw_data="d"
>             pata_hd_sector_buffer_high[count1] = pata_hd_data_high -- get high
>   serial_hw_data="e"
>             pata_hd_iord = low ^ PATA_HD_NO_INVERTER   -- end read pulse
>   serial_hw_data="f"  
>   serial_hw_data=13  
>   serial_hw_data=10  
>            count1=count1+1
>          until count1 == 0
>
> If I strip out everything, e.g. read pulses, delay and port reads, the loop 
> runs and displays:
>
> 0abcdef
> 1abcdef
> 2abcdef
> .
> .
> .
>
> If just one statement of those mentioned is not commented out, display is:
>
> 0abcdef
>
> (including the <13><10>)
>
> I have no idea yet what's happening then, if the device goes to sleep, if it 
> jumps into garbage code, if it is trapped inside some obscure loop or if it 
> waits for something to happen.
>
> My next step would be to implement a trace function that regularly outputs 
> the program counter value to see where the program hangs.
>
> > I am going to have new (final) fat32 files up soon in the
> > sample & lib
> > directories. Next, I'll have to add support for writing
> > file names,
> > and also for writing to the end of an file existing file
> > (while
> > creating additional fragments). That's gonna be a pain. But
> > still fun
> > of course :)
>
> Don't be discouraged by your libs not working yet here. We'll find the 
> problem and improve your libs, or the compiler, or the chip files :-)
>
> Greets,
> Kiste

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to