TCM8240MD connector and example

Have a good idea for a new product for SFE or Olimex? Let us know!

Moderator: phalanx

Re: TCM8240MD connector and example

Postby Dmitri » Mon Oct 04, 2010 12:48 am

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
Dmitri
 
Posts: 31
Joined: Thu Oct 29, 2009 1:39 am

Re: TCM8240MD connector and example

Postby noend » Mon Oct 04, 2010 7:34 am

Will give it a try.
Last edited by noend on Tue Jan 04, 2011 10:17 am, edited 1 time in total.
noend
 
Posts: 10
Joined: Wed May 19, 2010 3:45 am

Re: TCM8240MD connector and example

Postby Dmitri » Mon Oct 04, 2010 7:52 am

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.
Dmitri
 
Posts: 31
Joined: Thu Oct 29, 2009 1:39 am

Re: TCM8240MD connector and example

Postby noend » Mon Oct 04, 2010 6:48 pm

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.
noend
 
Posts: 10
Joined: Wed May 19, 2010 3:45 am

Re: TCM8240MD connector and example

Postby Dmitri » Tue Oct 05, 2010 12:44 am

Unfortunatelly, there is no PMP DMA with PIC24. As far as I know, there is only a tiny FIFO or so.
Dmitri
 
Posts: 31
Joined: Thu Oct 29, 2009 1:39 am

Re: TCM8240MD connector and example

Postby noend » Wed Oct 06, 2010 5:28 am

Yes, there is.
Last edited by noend on Tue Jan 04, 2011 10:21 am, edited 1 time in total.
noend
 
Posts: 10
Joined: Wed May 19, 2010 3:45 am

Re: TCM8240MD connector and example

Postby noend » Thu Oct 07, 2010 10:41 am

PMP DMA implemented successfully on PIC24H128GP204.
Last edited by noend on Tue Jan 04, 2011 10:22 am, edited 1 time in total.
noend
 
Posts: 10
Joined: Wed May 19, 2010 3:45 am

Re: TCM8240MD connector and example

Postby ollebula » Mon Oct 11, 2010 7:06 am

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
ollebula
 
Posts: 1
Joined: Mon Oct 11, 2010 6:42 am

Re: TCM8240MD connector and example

Postby noend » Wed Oct 13, 2010 2:30 pm

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.
noend
 
Posts: 10
Joined: Wed May 19, 2010 3:45 am

Re: TCM8240MD connector and example

Postby Dmitri » Sat Oct 16, 2010 3:08 am

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!
Dmitri
 
Posts: 31
Joined: Thu Oct 29, 2009 1:39 am

Re: TCM8240MD connector and example

Postby noend » Thu Oct 21, 2010 8:52 am

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.
noend
 
Posts: 10
Joined: Wed May 19, 2010 3:45 am

Re: TCM8240MD connector and example

Postby Dmitri » Thu Oct 21, 2010 2:49 pm

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 :)
Dmitri
 
Posts: 31
Joined: Thu Oct 29, 2009 1:39 am

Re: TCM8240MD connector and example

Postby noend » Thu Oct 21, 2010 3:27 pm

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.
noend
 
Posts: 10
Joined: Wed May 19, 2010 3:45 am

Re: TCM8240MD connector and example

Postby Dmitri » Thu Oct 21, 2010 11:35 pm

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! :)
Dmitri
 
Posts: 31
Joined: Thu Oct 29, 2009 1:39 am

Re: TCM8240MD connector and example

Postby comadrejo » Fri Oct 22, 2010 11:16 pm

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.
comadrejo
 
Posts: 4
Joined: Fri Oct 22, 2010 8:01 pm

PreviousNext

Return to New Product Ideas

Who is online

Users browsing this forum: No registered users and 2 guests