×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Help with DIY CCD driver

  • Posts: 167
  • Thank you received: 54
hi

i'm trying to write my own driver for my diy camera.
it's based on CCD template, but i'm stuck with C stuff, i'm sure it will make laugh all C gurus
My library provides a function that returns a pointer to a buffer containing my frame (cameraGetImage())
I don't know how to return back my image to Indi in function grabImage() :
     long unsigned int *image;
     image = (long unsigned int *) PrimaryCCD.getFrameBuffer();
     image = cameraGetImage();

i've tried to read other 3rdparty driver, but i don't understand as a noob that i am...
I would respectfully appreciate any advice !

Gilles
7 years 8 months ago #9332

Please Log in or Create an account to join the conversation.

yeah this won't work. You can use PrimaryCCD.setFrameBuffer(cameraGetImage()). Is there documentation to the API you're using?
7 years 8 months ago #9335

Please Log in or Create an account to join the conversation.

  • Posts: 167
  • Thank you received: 54

Replied by gehelem on topic Help with DIY CCD driver

there is no documentation, it's homemade...
in my library, i fill my frame in a buffer :
static unsigned int bufim[3000][2000];
My function cameraGetimage() simply returns a pointer to this buffer :
unsigned int * cameraGetImage();
{
  return *bufim;
}
(i've changed my definitions since last post : it is now a unsigned int instead of a long unsigned int)

...thank for your help...
7 years 8 months ago #9336

Please Log in or Create an account to join the conversation.

Why is it unsigned int? Is your camera depth 32 bits per pixel?
7 years 8 months ago #9338

Please Log in or Create an account to join the conversation.

  • Posts: 167
  • Thank you received: 54

Replied by gehelem on topic Help with DIY CCD driver

:blink:
it's 16 bits
i think i'm lost here
will try with unsigned short
7 years 8 months ago #9339

Please Log in or Create an account to join the conversation.

Please try to put your driver somewhere like Github so at least we can see the code and could comment on it.
7 years 8 months ago #9340

Please Log in or Create an account to join the conversation.

  • Posts: 167
  • Thank you received: 54

Replied by gehelem on topic Help with DIY CCD driver

okay, let's go :
the original project is here : astroccd.org/
and there is this really long thread :
www.cloudynights.com/topic/497530-diy-as...t-color-6mpx-camera/
it's a DIY CCD Camera based on Nikon D40/50/70 CCD chip
It works really well.
But : for now, the code is written in Delphi, and works with ASCOM pilots
i'm just trying to translate in C the Delphi library found here :
github.com/vakulenko/CAM8_software

So, here is my attempt :
github.com/gehelem/indi_cam84_ccd
Last edit: 7 years 8 months ago by gehelem.
7 years 8 months ago #9342

Please Log in or Create an account to join the conversation.

  • Posts: 167
  • Thank you received: 54

Replied by gehelem on topic Help with DIY CCD driver

for the record :
my ugly driver is working now, anyone interested ?
(this cam84 is really an interesting project, now followed by a new version Cam86)
Gilles.
The following user(s) said Thank You: Jasem Mutlaq
7 years 4 months ago #11502

Please Log in or Create an account to join the conversation.

Great news! Can you write a detailed article on it so we can publish? I'm sure there are some out there who love DIY solutions!
7 years 4 months ago #11503

Please Log in or Create an account to join the conversation.

  • Posts: 167
  • Thank you received: 54

Replied by gehelem on topic Help with DIY CCD driver

Of course with pleasure, (tell me how)
But first i'll need a few more weeks to clean and improve my code :
-framing not tested
-binning not tested
-need to understand how to render bayer matrix
-real sky tests !
I also want to test on raspberry, Odroic C2 & XU4 (i have one of each) :
The use of FTDI D2XX driver forces to unload modules ftdi_sio and usbserial, which prevents to use the majority of USB serial converters...
This is a big disadvantage we can solve chaining indi servers
Gilles.
Last edit: 7 years 4 months ago by gehelem.
7 years 4 months ago #11516

Please Log in or Create an account to join the conversation.

Yes please have your driver somewhat production-ready first and the FTDI problem is a show stopper for most users since it would break their device connections, so try to figure out a clean solution.
7 years 4 months ago #11519

Please Log in or Create an account to join the conversation.

  • Posts: 167
  • Thank you received: 54

Replied by gehelem on topic Help with DIY CCD driver

:) One step forward :
I've updated the code to use libftdi instead of D2XX -> now i can keep the usage of serial adapters
:( One step backward :
i have now troubles to synchronise writes and reads of ft2232 with libftdi, images are degraded
i think timings ar different between D2XX and libftdi, i have to investigate...
"stay tunned"
7 years 4 months ago #11849

Please Log in or Create an account to join the conversation.

Time to create page: 0.303 seconds