View previous topic :: View next topic |
Author |
Message |
yousef55
Joined: 04 Feb 2015 Posts: 3
|
Posted: Thu Oct 20, 2016 12:20 am Post subject: mmc speed is very low! |
|
|
Hello
Why read speed of MMC low?
How can MMC received information faster?
(BASCOM-AVR version : 2.0.7.8 ) |
|
Back to top |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Thu Oct 20, 2016 7:41 am Post subject: |
|
|
Hello,
Please provide more information. For example code Hardware layout etc. Also how slow is slow?
Regards
Ian Dobson _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
yousef55
Joined: 04 Feb 2015 Posts: 3
|
Posted: Fri Oct 21, 2016 7:01 am Post subject: |
|
|
connected MMC ( Several models) to ATmega128 & ATmega32 , but in each connect the MMC read speed maxim 50 Kbyte/second
if use (( line inpute )) to read line , for each byte in line , 20 us delay there,
but MMC read speed in cell phone or use in PC is very higher
My progrm:
While Drivecheck() <> 0
Wend
Print "MMC Inserted"
Wait 1
While Driveinit() <> 0
Wend
While Initfilesystem(1) <> 0
Wend
dim s as string*100
Open "abc.TXT" For Input As #1
Line Input #1 , S
""""((this here for read line ,1ms delay there if line have 50 byte))""""""
conect MMC to MCU in hard spi mode !
Is there a way to increase speed ??
Thanks for the answer |
|
Back to top |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Fri Oct 21, 2016 7:11 am Post subject: |
|
|
Hi,
What Speed is the SPI running at (try running it as fast as possible).
Note your cell phone has a much quicker CPU (GHz) so it can process data much quicker.
Regards
Ian Dobson _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
Posted: Fri Oct 21, 2016 10:07 am Post subject: |
|
|
You can not compare 8bit 16Mhz avr processor with an quad core 64bit 1Ghz arm processor.
Some more code would be handy to help you.
Did you set the double clock spi bit?
Code: |
Spsr.spi2x = 1 'Double SPI clock
|
_________________ www.evertdekker.com Bascom code vault |
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Sat Oct 22, 2016 5:40 am Post subject: |
|
|
Not only is the clock speed and SPI speed a LOT lower in an AVR, but many card readers read the card using more than 1 data line, 4 is common. So you get nibbles, not just bits, per SPI clock cycle. Also many devices read an entire card sector, 512 bytes into a buffer in one operation, then the equivalent of line input is done on the buffer, so appears very fast ( although the total throughput is still a fair bit slower ). _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
yousef55
Joined: 04 Feb 2015 Posts: 3
|
Posted: Sat Oct 22, 2016 12:43 pm Post subject: |
|
|
Thanks for the answers...
There is a way to communicate quickly with MMC ??
Do AVR can communicate with the MMC by the 4 data line?
Thanks to all friends for answers....... |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Sat Oct 22, 2016 12:54 pm Post subject: |
|
|
topic close : pirated copy user. _________________ Mark |
|
Back to top |
|
|
|