This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

create images with c2000



I want to sample a voltage from a photodiode to build up an image of 255 x 255 pixels at a frame rate of a few Hz in real time with 8 or 10 bit resolution. Does the C2000 enable me to do this? Does it have built in ADCs that can read at that speed?  If so can I then buffer each 255x255 array and send the images out at the frame rate to a pc or micro?

  • Hi,

    Can you be more clearer about the ADC sampling rate you're looking for?

    Regards,
    Gautam
  • sure - 255 x255 pixels is 65025 pixels and at a frame rate of say 5Hz means 325125 pixels per seconds. So I am looking to read the ADC at a rate of about 330kHz with 10 bit resolution.

  • Tigersoft said:
    So I am looking to read the ADC at a rate of about 330kHz with 10 bit resolution.

    Not an issue at all. You can go much higher! You can check this link if you want to explore Mega samples else you can follow the sample codes:

    Let me know if you want any suggestions to choose a controller or do you already have one?

    Regards,

    Gautam

  • Hi Tigersoft,

    One other thing to consider is that while the ADC can sample at this rate, the sampling is sequential. This means that the image will be captured over a time of (pixels / sample rate). If you are using say a F2833x device, this will give at best a capture time of 65025/12500000 = 5.2ms. So the first pixel and last pixel will be sampled this far apart in time, which may create issues if there are fast moving objects in the image.

    You should also consider how much RAM the devices have. F2833x has 34KW SRAM, which won't be quite enough to store a full frame in a raw format (if you only take 8-bits of data, you could fit it if you pack 2 pixels per 16-bit word). F2837xD has 64KW shared SRAM + 36KW per CPU, so there should be enough space to store a full frame. Both of these devices can be connected to a large external RAM memory though a parallel memory interface to store many frames.

    As far as streaming to a PC, 330Kpixels/second * 10-bits/pixel = 3.3Mbits/second transfer rate. This definitely is too fast for Rs-232, but you should be able to use something like SPI.
  • Thanks for the link, that is really useful!

  • The extra insight is excellent -these are problems that I would have hit downsteam, so a really useful heads up.
    Thanks