You don't need dual port RAM. Implement a counter in the CPLD to generate the RAM address and increment it after each access. Provide some means for the PIC to reset the counter. Connect the pixel clock from the sensor to trigger the memory writes and increment the address counter. Probably that logic must include HSYNC and VSYNC also. Add a signal for the CPLD signal that a frame is finished and another to start and cancel the capture by the PIC. It would be a bonus if you can read and modify the address counter also, and even better if the PIC can also write to the RAM. Don't forget that your logic must wait for the start of a frame before it starts to write to the RAM, and it must stop when the frame is done. My design does all that and more, so I can use some of the RAM for application data. I use SRAM. As you need SDRAM, perhaps a CPLD is not enough. Probably you need an FPGA. Isaac Em 23/5/2012 12:24, Andre Abelian escreveu: > Isaac, > > I agree. My question is let say I use cpld to capture the data now i need= to compare portion of the image to > determine as motion change. I am thinking to use dual ported ram to captu= re the image and use pic to access > to ram and compare data? what do you think? > > Andre > > > > ________________________________ > From: Isaac Marino Bavaresco > To: Microcontroller discussion list - Public. =20 > Sent: Wednesday, May 23, 2012 5:56 AM > Subject: Re: [PIC]: PIC32 for camera capture > =20 > Did you notice that 10ns is 100MHz? > > That means that you have to read one 12-bit pixel from the sensor and > store it to external memory faster than any PIC can execute one instructi= on. > Even a 400MHz ARM would have a hard time doing this without hardware > assistance. I tried and desisted. It is doable, but the ARM becomes > enslaved by the image capture. > > > Isaac > > > > > > Em 22/5/2012 23:33, Andre Abelian escreveu: >> Hi Jason, >> >> Finally I chose the part MT9P401 from Aptina. based on my understanding >> the pixel output period is every 10.4nS. so the pic should be able to ca= pture 12 bit "12 pins" data ever >> 10 nS and save it in SDRAM. basically there are 5.000.000 pixels I need = to capture and store them in SDRAM. >> how about pic24EP 120mhz is it faster then pic32? in my case I reall= y need 16 bit. >> pic32 is 80mhz/2 40 mhz and pic24EP is 120mhz/2 60 mhz. what do you = think? >> >> any suggestion will appreciate >> >> thanks >> >> Andre. =20 >> >> >> ________________________________ >> From: Jason White >> To: Microcontroller discussion list - Public. =20 >> Sent: Monday, May 21, 2012 2:25 PM >> Subject: Re: [PIC]: PIC32 for camera capture >> =20 >> On Mon, May 21, 2012 at 5:13 PM, Andre Abelian = wrote: >>> Hi all, >>> >>> does any one know if pic32 will have enough speed to capture a camera d= ata? >>> I am thinking to use 5 mp camera directly connected to pic and of cours= e there is >>> a RAM too for a buffer. main purpose of the camera is to sense a motion= change and >>> send the data thru wireless when change detected. I am originally picke= d altera cyclone3 FPGA >>> part for some how I believe PIC32 may do the job. once the motion is de= tected we can stop it >>> send it out then continue. I do not need to do continues live video tra= nsmit or some thing. >>> >>> any idea or suggestion will appreciate >> I am no expert at this, but the frame rate you want to read from the >> camera and process the data will determine whether or not your >> processor is fast enough. More details please ! >> >> --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .