Minimig Discussion Forum

Discussing the Open Source FPGA Amiga Project
It is currently Sun Sep 24, 2017 3:09 am

All times are UTC




Post new topic Reply to topic  [ 51 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: Pic firm. with SDHC, FAT16/32, Dir, HDD support for YQ091224
PostPosted: Mon Jan 25, 2010 10:15 pm 
Offline

Joined: Wed Jan 06, 2010 7:47 pm
Posts: 25
So am I. :-) I may still manage to fix my nusim board but keep me posted if you have any space boards.


Top
 Profile  
 
 Post subject: Re: Pic firm. with SDHC, FAT16/32, Dir, HDD support for YQ091224
PostPosted: Tue Jan 26, 2010 12:26 am 
Offline

Joined: Mon Jan 04, 2010 12:30 pm
Posts: 20
Location: Sydney, Australia
I will have to run a new order as there is only one spare board in my initial order with my friend - we did not realise that other people would want to buy boards.. :-\

Regards,

Ross..


Top
 Profile  
 
 Post subject: Re: Pic firm. with SDHC, FAT16/32, Dir, HDD support for YQ091224
PostPosted: Sun Feb 21, 2010 11:21 am 
Offline

Joined: Mon Dec 01, 2008 6:41 pm
Posts: 166
@quille
I just wanted to post and say that I like your pic firmware which HD support as although it is not as fast as the arm controller version after I reduced my HD image size down to 85MB (the same size as my original Amiga HD) the speed is quite usable and allows me to play civilization and eye of the beyholder 1 and 2 quite nicely from HD on my non upgraded Minimig.

It also works nicely for running DPaint DOPUS and the most of the other Amiga application I use on a 68K amiga even if my 2MB minimig dose to have the required ram to run most whdload games.

So yes a little more speed from the PIC HD emulation would be nice if you can achieve it but it is not required to make HD emulation useful as long as you dont create to large a HD file.

The 700MB file I use with my ARM upgrade minimig with 4MB of ram is to slow to be usable on your PIC firmware, but this is not a real problem as most of the extra space is used by WHDLOAD games that require the extra ram to work anyway so you are not losing anything on a base specification minimig.

_________________
2MB Minimig with PIC
4MB Minimig with ARM Addon board


Top
 Profile  
 
 Post subject: Re: Pic firm. with SDHC, FAT16/32, Dir, HDD support for YQ091224
PostPosted: Mon Feb 22, 2010 11:05 pm 
Offline

Joined: Sat Jul 11, 2009 12:48 am
Posts: 48
@dwyloc

Thanks for feedback :)
I'm glad that you like it, original idea was to do as much I can on original minimig HW.

Unfortunatelly I don't think I can get more speed from pic hw emulation.
There are actually two big limiting factors:
1.) Pic RAM size (I can't build table of clusters to access HD file without reading sectors from fat)
2.) SPI bus speed that is really limited by pic clock.

Just today I recived other pic chips that I'm going to try to use for futher development.
I have bought PIC 18LF2685, idea I'm haveing is:
1.) Use pic internal clock (higher say 40Mhz)
2.) This pic has more flash (96kb) so I could add few user firendly features like loading alternate cores and multi block transfer etc, nicer menus or anything that requires more flash and not too much ram.
3.) Easier debug and development (more flash more debug output :) )

Since clock is fster that should alow me faster transfers through SPI but as stated many times before by Yaqube, real problem is file seek, unfortunately this new pic device also has just 3kb of ram so I don't think that I could use it to build table for faster HD access.

But I'm aming this mod for average minimig user, buy pic, ask friend program bootloader, enjoy upgrades on original hardware without soldering anything on board.

I have been lazy last few weeks, so I did'n coded anything for minimig but I'm going to start again.
I'm going to work on improvements on original pic (ther is still few bytes left in flash) learn a bit of verilog/whdl in attempt to support muliti core loading e.g. FPGA64, and Zx Spectrum with support for separate rom loading to avoid copyright isses in distiribution of FPGA cores.

At least that is my idea of relaxing and spending my free time :)


Top
 Profile  
 
 Post subject: Re: Pic firm. with SDHC, FAT16/32, Dir, HDD support for YQ091224
PostPosted: Tue Feb 23, 2010 2:07 pm 
Offline

Joined: Mon Dec 01, 2008 6:41 pm
Posts: 166
@quille
Quote:
Unfortunatelly I don't think I can get more speed from pic hw emulation.
There are actually two big limiting factors:
1.) Pic RAM size (I can't build table of clusters to access HD file without reading sectors from fat)
2.) SPI bus speed that is really limited by pic clock.

Thats OK I have not done any speed tests but with an 80MB or so hard disk file the speed is very usable and feels as fast as my original 80MB 2.5"HD that came with my A1200 when it was new.

I think adding a note to the readme file about a recommended max size of the file and a recommending turning on directory caching when you are creating and formatting your hard disk partition as that helps a lot as well.

Quote:
I'm going to work on improvements on original pic (ther is still few bytes left in flash) learn a bit of verilog/whdl in attempt to support muliti core loading e.g. FPGA64, and Zx Spectrum with support for separate rom loading to avoid copyright isses in distiribution of FPGA cores.


Sounds good to me I have been wishing for the ability to use both a ZX Sectrum and or a C64 core on my minimig since I first got it as I have a lot of fond memories of playing on old 8bit computer systems during the school holidays as a kid.

Anyway thanks for all your hard work bringing the PIC as close to the ARM board as possible, not get me wrong I like my other minimg with the ARM board as well, its just nice to be able to get as much use from my non upgraded board as well and I expect most minimig users wont get the arm addon board.

_________________
2MB Minimig with PIC
4MB Minimig with ARM Addon board


Top
 Profile  
 
 Post subject: Re: Pic firm. with SDHC, FAT16/32, Dir, HDD support for YQ091224
PostPosted: Tue Feb 23, 2010 3:07 pm 
Offline

Joined: Mon Jan 04, 2010 12:30 pm
Posts: 20
Location: Sydney, Australia
Hi quille,

quille wrote:
@dwyloc

Just today I recived other pic chips that I'm going to try to use for futher development.
I have bought PIC 18LF2685, idea I'm haveing is:
1.) Use pic internal clock (higher say 40Mhz)
2.) This pic has more flash (96kb) so I could add few user firendly features like loading alternate cores and multi block transfer etc, nicer menus or anything that requires more flash and not too much ram.
3.) Easier debug and development (more flash more debug output :) )

But I'm aming this mod for average minimig user, buy pic, ask friend program bootloader, enjoy upgrades on original hardware without soldering anything on board.


I totally agree that a new PIC which is a 'drop-in' replacement for the old PIC18LF252 should be found, and a couple of weeks ago I also did some research on a replacement :-).

Your choice of 18LF2685 is good, but be aware of the following issues:

1) You cannot run this device at 40Mhz with the Minimig hardware because the external oscillator is 20Mhz. If you use the HSPLL mode, you will cause the PIC to run at 80Mhz! This is over the maximum allowable speed of 40Mhz
2) If you use the internal oscillator then you can only run at 32Mhz maximum speed (8MHz INTOSC+PLL)
3) This device is designed for 2V - 5.5V. This means that you cannot operate at maximum speed of 40Mhz with only 3.3V VCC. The Minimig hardware supplies 3.3V only. If you look at the graph on page 420 of the data sheet, you will see at 3.3V VCC, the maximum speed is probably around 30MHz or so.
4) It is an expensive PIC model

As an alternative to the 18LF2685 I also shortlisted the PIC18F26K20, with has the following advantages over 18LF2685:

1) Device is designed for 3.3V, so you can operate it at full speed on the Minimig, which is 64MHz if you use internal oscillator (much faster than 18LF2685)!
2) Device is much cheaper than 18LF2685 ($3.20 vs $11.52)
3) Device has slightly more RAM than 18LF2685 (3.8K vs 3.25K)

However the disadvantage is that the PIC18F28K20 only has 64KB Program Flash vs 96KB Program Flash in 18LF2685, 50% less!

So final decision depends on what you think is the most important detail for better PIC Firmware -

Massive flash size (18LF2685) vs More RAM, Faster Speed, and Cheaper price (18F26K20)

The other issue to consider is that the Bootloader might not support newer PICs..

Hope this helps :-)

Regards,

Ross..


Top
 Profile  
 
 Post subject: Re: Pic firm. with SDHC, FAT16/32, Dir, HDD support for YQ091224
PostPosted: Wed Feb 24, 2010 12:42 am 
Offline

Joined: Sat Jul 11, 2009 12:48 am
Posts: 48
Hi Rossv

Quote:
Your choice of 18LF2685 is good, but be aware of the following issues:

1) You cannot run this device at 40Mhz with the Minimig hardware because the external oscillator is 20Mhz. If you use the HSPLL mode, you will cause the PIC to run at 80Mhz! This is over the maximum allowable speed of 40Mhz
2) If you use the internal oscillator then you can only run at 32Mhz maximum speed (8MHz INTOSC+PLL)
3) This device is designed for 2V - 5.5V. This means that you cannot operate at maximum speed of 40Mhz with only 3.3V VCC. The Minimig hardware supplies 3.3V only. If you look at the graph on page 420 of the data sheet, you will see at 3.3V VCC, the maximum speed is probably around 30MHz or so.
4) It is an expensive PIC model

I was avare that I can't use it on external oscilator becuse it would x4 ext clock so I must use internal.
I was also considering using 10Mhz oscilator and internaly x4 clock but that would require soldering new crystal and possibly two capacitors on board.

I really need to learn reading that data sheets better :) I wasn't aware that higher clock requires higher voltage, I just assumed that LF version works on 3,3 V and allows reprograming through boot loader.

32Mhz might be good but it is not that big improvement over 20Mhz because SPI clock would jump from 5Mhz to 8Mhz, I was hoping for higher speeds :) But I really don't know which speed requires bridging one resistor on SD card slot so for normal users it would be good to keep it below that speed limit.

Quote:
As an alternative to the 18LF2685 I also shortlisted the PIC18F26K20, with has the following advantages over 18LF2685:

1) Device is designed for 3.3V, so you can operate it at full speed on the Minimig, which is 64MHz if you use internal oscillator (much faster than 18LF2685)!
2) Device is much cheaper than 18LF2685 ($3.20 vs $11.52)
3) Device has slightly more RAM than 18LF2685 (3.8K vs 3.25K)

However the disadvantage is that the PIC18F28K20 only has 64KB Program Flash vs 96KB Program Flash in 18LF2685, 50% less!
So final decision depends on what you think is the most important detail for better PIC Firmware -
Massive flash size (18LF2685) vs More RAM, Faster Speed, and Cheaper price (18F26K20)
The other issue to consider is that the Bootloader might not support newer PICs..

Hope this helps


It helps :)
Initially I was looking for device with large flash to be able to enable debugging printfs and add more features.
RAM is also very important but I couldn't find pic that has large ammount of ram for e.g. building tables for HD file access display sorted directory lists etc.

So to sum up requirements :) other pic should:
1.) Should be pin-to-pin compatible with current pic so any user can exchange it easily
2.) Should be cheap
3.) Should have more FLASH (64K+ the bigger the better)
4.) Should have more RAM(the bigger the better :) )

Tiny Boot loader has generic asm source so it shouldn't be too big problem to adapt it to new pic device.
I'm going to try it for 18LF2685 that I allready have as far I can see it will require bit reading and testing :)

I'll get myself PIC18F28K20 also to be able to experiment :)
I'll also need some kind of pic programmer also I was thinking some cheep programmer from ebay recomendations are welcome. It would be nice if I could use some kind of debuger instead of just printf to serial. There are some kind of PIC debuggers ICD2 and ICD3 but I don't know they would work for minimig.


Top
 Profile  
 
 Post subject: Re: Pic firm. with SDHC, FAT16/32, Dir, HDD support for YQ091224
PostPosted: Wed Feb 24, 2010 3:39 pm 
Offline

Joined: Mon Dec 01, 2008 9:58 pm
Posts: 1568
Location: .de
quille wrote:
But I really don't know which speed requires bridging one resistor on SD card slot so for normal users it would be good to keep it below that speed limit..

I think it will only be required above 8MHz of SPI clock rate.
Maybe due to a little tolerance ~10MHz could work without error. One has to check it out.

_________________
_____________________________
JMP $00000BED ; will guru-meditation until next morning


Top
 Profile  
 
 Post subject: Re: Pic firm. with SDHC, FAT16/32, Dir, HDD support for YQ091224
PostPosted: Thu Feb 25, 2010 1:36 am 
Offline

Joined: Wed May 06, 2009 10:04 pm
Posts: 11
Just to know... What are the specs of the actual PIC? :roll:


Top
 Profile  
 
 Post subject: Re: Pic firm. with SDHC, FAT16/32, Dir, HDD support for YQ091224
PostPosted: Thu Feb 25, 2010 1:18 pm 
Offline

Joined: Mon Jan 04, 2010 12:30 pm
Posts: 20
Location: Sydney, Australia
Hi Quille,

quille wrote:
Hi Rossv
So to sum up requirements :) other pic should:
1.) Should be pin-to-pin compatible with current pic so any user can exchange it easily
2.) Should be cheap
3.) Should have more FLASH (64K+ the bigger the better)
4.) Should have more RAM(the bigger the better :) )

I did a parametric analysis of all the currently available PIC18 devices that fulfill "basic requirements" (pin compatible, has EEPROM, can self-program itself, more FLASH and RAM than PIC18F2525), and the following devices are possibly suitable:

PIC18LF2685
PIC18F26K20
PIC18LF2620

The first two PICs we already discussed, and the last one is new to our discussion :-).

Each of these PICs has strengths and weaknesses, and unfortunately there is no 'perfect' PIC which fulfills all the requirements in your list.

To make a choice, one would need to decide what is the highest priority requirement.
Here is a table of priorities and which PIC is suitable for that priority:

Maximum Flash - Choose PIC18LF2685 (~30MHz possible, 96KB Flash, 3328 bytes RAM, $5.87)
Maximum RAM - Choose PIC18LF2620 (~30MHz possible, 64KB Flash, 3968 bytes RAM, $4.06)
Maximum speed, lowest price - Choose PIC18F26K20 (64MHz possible, 64KB Flash, 3936 bytes RAM, $1.65)

If price and speed is no concern, then the PIC18F26K20 is no longer attractive, because the PIC18LF2620 is very similar, but has slightly more RAM.
If RAM is more important than Flash, then PIC18LF2620 or PIC18F26K20 is more attractive, depending on whether you prefer speed/price over slightly more RAM.

These are the best PICs for us, but in the end you can only decide after you have performed some evaluation, I hope it goes well :-)

quille wrote:
I'll get myself PIC18F28K20 also to be able to experiment :)
I'll also need some kind of pic programmer also I was thinking some cheep programmer from ebay recomendations are welcome. It would be nice if I could use some kind of debuger instead of just printf to serial. There are some kind of PIC debuggers ICD2 and ICD3 but I don't know they would work for minimig.

Make sure that you try to get free samples of PICs from Microchip. This is especially good if you are evaluating different devices :-).

Regarding ICD2/ICD3/REAL ICE - these are great devices for in-circuit programming and debugging, but unfortuantely the Minimig hardware is not correctly setup for this. The PGD/PGC lines need to be dedicated for the ICSP header, but they seem to be used with the FPGA, and also you need a diode on MCLR to stop power from ICD from flowing into the board. So without hardware modifications, this won't be straightforward :-(.

Regards,

Ross..


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 51 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Translated by Xaphos © 2007, 2008, 2009 phpBB.fr