SparkFun Forums 

Where electronics enthusiasts find answers.

Have a good idea for a new product for SFE or Olimex? Let us know!
By Dmitri
#110730
noend wrote:
Dmitri wrote:The main issue I found is a bottleneck while writing to the SD card, SPI is configured to work @ 10MHz which is the theoretically the maximum clock speed allowed as per Microchip datasheet.
In my theory, the SPI can work @ 40 MHz quite good. :D
By Dmitri
#110744
noend wrote:
Dmitri wrote:In my theory, the SPI can work @ 40 MHz quite good. :D
I'll then configure it to work @ 40MHz. :D so I suppose the Sandisk MicroSDHC is running at that speed?
Actually, they all may not, but they work indeed. I read that 25 MHz is the limit. It is not ;)
The clock signal looks horrible at a 60MHz oscilloscope.

I use SPI clock speed switching. I found it usefull to run it at lower speeds for FAT operations but at highest speed for miltiblock writes.
BTW, I never test if the block was accepted by reading a reply byte. I could, but I do not. It works quite reliable with many different transflash cards bought on Internet.

The only FAT operation that I need is finding the start sector of a file that I put onto the card before. I start with this sector. Thus, the card is still readable unter Windoze.
By noend
#110780
Currently using 10MHz for FAT related operations and 40MHz for multiple block write operations.
Moving actual implementation to use PMP DMA.
Last edited by noend on Tue Jan 04, 2011 10:20 am, edited 1 time in total.
By noend
#110951
PMP DMA implemented successfully on PIC24H128GP204.
Last edited by noend on Tue Jan 04, 2011 10:22 am, edited 1 time in total.
By ollebula
#111164
Hi everybody

Very interesting thread this one.
I wonder what the status are of all your projects, anyone got the camera up running at decent speed?
Dmitri seemed to have a half-working system. Anyone else? What about the jpeg compression, anyone taken control of that one?

I would like to interface the camera with a PIC/dsPIC (because I'm used to them) and wonder if there are anyone who would like to share their work with me to get me started.

/Olle
By noend
#111350
Finally done! I removed the FIFO successfully and got ~25fps on my design using TCM8230. :D I will send to manufacture a few boards and will post images soon.
By Dmitri
#111516
noend wrote:Finally done! I removed the FIFO successfully and got ~25fps on my design using TCM8230. :D I will send to manufacture a few boards and will post images soon.
My congratulations!
By noend
#111851
Dmitri wrote:Unfortunatelly, there is no PMP DMA with PIC24. As far as I know, there is only a tiny FIFO or so.
I'm afraid there is a PMP DMA, at least on the PIC24HJ128GP204. In fact, the old design I had which use the AL422B is using DMA5 with PMP in master mode 2 and a 256 bytes dma buffer. DMA PMP fills a 4800 bytes array which has to be filled 8 times (fill->write to sd) to have a full 160*120 frame.
By Dmitri
#111872
noend wrote:
Dmitri wrote:Unfortunatelly, there is no PMP DMA with PIC24. As far as I know, there is only a tiny FIFO or so.
I'm afraid there is a PMP DMA, at least on the PIC24HJ128GP204. In fact, the old design I had which use the AL422B is using DMA5 with PMP in master mode 2 and a 256 bytes dma buffer. DMA PMP fills a 4800 bytes array which has to be filled 8 times (fill->write to sd) to have a full 160*120 frame.
Hmm... Here is the DMA manual for PIC24H

http://ww1.microchip.com/downloads/en/D ... 70223b.pdf

On p.2 I read:
Peripherals supported by the DMA controller include:
• ECAN™ technology
• 10-bit/12-bit Analog-to-Digital Converter (ADC)
• Serial Peripheral Interface (SPI)
• UART
• Input Capture
• Output Compare
I might be missing something :)
By noend
#111874
Yes, you are :)

http://ww1.microchip.com/downloads/en/D ... 70302B.pdf

On p.26 I read:
DIRECT MEMORY ACCESS (DMA) SUPPORT
DMA reads from and writes to the PMDIN1 register (DMAxPAD = 0x0608) when the PMP module
is configured for Master mode. To use DMA, follow these steps:
1. The DMAxREQ bits (IRQSEL<6:0>) must be set to ‘b0101101’
2. The PMP module must be configured as a Master (MODE<1:0> = 11 or 10)
3. A PMP interrupt must be generated on every byte (IRQM<1:0> = 01)
As I told you I have my system up and running with PMP DMA.
Last edited by noend on Tue Jan 04, 2011 10:13 am, edited 1 time in total.
By Dmitri
#111898
noend wrote:Yes, you are :)

http://ww1.microchip.com/downloads/en/D ... 70302B.pdf

On p.26 I read:
DIRECT MEMORY ACCESS (DMA) SUPPORT
DMA reads from and writes to the PMDIN1 register (DMAxPAD = 0x0608) when the PMP module
is configured for Master mode. To use DMA, follow these steps:
1. The DMAxREQ bits (IRQSEL<6:0>) must be set to ‘b0101101’
2. The PMP module must be configured as a Master (MODE<1:0> = 11 or 10)
3. A PMP interrupt must be generated on every byte (IRQM<1:0> = 01)
As I told you I have my system up and running with PMP DMA.
OMG! Microchip has indeed forgot to mention PMP in its DMA manual. OMG!

Good to know. Thank you! :)
By comadrejo
#111979
Congratulations Mr Dmitri, you got an impressive compact
design.

It is a shame that I have not found yet in the forum a single
Schematic TRULLY TESTED of how to PARTICULARLY interface
the TCM8230MD cam.

I am not asking the schematic of your FULL design , JUST the
detail of :
+ Critical feed Volts in analog cam pins.
+ Cam pins targeted by Microcontroller pins (and how)

Just that (only CAM CONNECTIONS INVOLVED).

Keep for you deeper details as :
SD connection.
Your particular Micro settings.
Your Micro In System Programming method.
Source code.
...

Many of us want the cam for educational purposes, not to
win the Novel Price.

I just want to connect the cam to my ATMega8 to take just
1 single frame in ALL NECESSARY TIME FOR THE PURPOSE. Just
seeing the 1 single frame in the PC will make me happy.

Many other users would look more ambicious purposes, but
ALL need basic interfacing to start from.

Please, give us that essential PRACTICAL feedback.

Best regards.
  • 1
  • 23
  • 24
  • 25
  • 26
  • 27
  • 31
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]