TCM8240MD connector and example

noend:

Dmitri:
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

Will give it a try.

noend:

Dmitri:
In my theory, the SPI can work @ 40 MHz quite good. :smiley:

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.

Currently using 10MHz for FAT related operations and 40MHz for multiple block write operations.

Moving actual implementation to use PMP DMA.

Unfortunatelly, there is no PMP DMA with PIC24. As far as I know, there is only a tiny FIFO or so.

Yes, there is.

PMP DMA implemented successfully on PIC24H128GP204.

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

Finally done! I removed the FIFO successfully and got ~25fps on my design using TCM8230. :smiley: I will send to manufacture a few boards and will post images soon.

noend:
Finally done! I removed the FIFO successfully and got ~25fps on my design using TCM8230. :smiley: I will send to manufacture a few boards and will post images soon.

My congratulations!

Dmitri:
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:

Dmitri:
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 :slight_smile:

Yes, you are :slight_smile:

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.

noend:
Yes, you are :slight_smile:

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! :slight_smile:

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.

Everything you need to interface the TCM8230MD to a MCU is in the data sheet.

anyone has .brd or .sch eagle files of the breakout board for the TCM8230MD camera?

I am having a problem interfacing with the TCM8230MD on I2C using a Texas Instruments DM365 chip:

When reading the register (0x00 in this case) the I am getting the first Acknowledgement but not the second! Therefore nothing is happening and I cannot read the register.

I2c Read protocol: S SlaveAddress 0 A SubAddress A

Where SlaveAddress = 0x60 or 0x3c +0 and SubAddress = 0x00.

The first A (Acknowledgement) is OK but I am not sure if the second appears. Here are my screenshots:

Yellow = SDA; Blue=SCL

You can see the yellow SDA line going down for the first Acknowledgement but there is no second A after sending the SubAddress.

Larger zoom (notice the long pause) :

My clock is at 10Mhz, my lines at 3VDC.

Any idea why?

Do you mean your SCL Clock is at 10 MHz? If so perhaps try scaling it down a couple orders of magnitude. SCL Max is 400 khz according to general I2C specs, as well as the TCM8230 datasheet.

Edit: NM, if I’m reading your scope traces correctly you’re more in the ballpark of 300-400 KHz, which should be fine.

Hi everyone,

and greetings from me. I ordered two 8230 cams and I’ll start experimenting as soon as they arrive. Anyway, has anyone tried the data transfer using an FTDI245 parallel FIFO USB chip? It has 8 data line can bedirectly connected to the camera DOUTs, and a 384 bytes FIFO. There would be no MCU action but to validate the lines at the FTDI’s WR pin. Any idea?

@Dmitri

Would you be so kind as to name that battery pack on your picture? Thank you.