PC Interfacing a GameBoy Camera using PIC18F4620 microcontroller
PC Interfacing a GameBoy Camera
This is the card connected to my old PIC board. Since I had one laying around, I just made an expansion card to it for this project.
PORTC of the PIC is used for communicating with the camera, PORTD is dedicated to the 8-bit ADC output, and PORTB is used for the ADC’s CS and servos, which I didn’t really manage to control at that time (I tried observing pixel values on the fly, finding the brightest first pixel’s coordinates with a small formula, and adjusting the servo angles in accordance). Servos just went crazy, and I lost patience 😐
The LED’s are for displaying board power and frame capture. The schematics are a bit tangled since I didn’t care much about pin labeling then (to quickly create the PCB), so please have patience. I’m not going to attach the PIC board schematic and PCB files (but please pay attention to the pictures for pin orientation), since it’s basically a 40-pin PIC board with a crystal, and all the ports are connected to IDC-10 connectors.
The pinout of the M6428FN connector in the schematic is as follows, so you can make a simpler adapter / connector for the camera as you see in the picture:
2- Vout to ADC (Image data in analog)
3- Bit-bang XCK for SIN, RESET, LOAD, and START (and 10 KHz PWM with 50% DC to get the pixel values), also triggers ADC
conversion for each pixel value (74HC14 inverts this signal for the ADC to start the conversion), after a successfull read, ADC sends and interrupt to the PIC, and the PIC sends the digital value to its USART, which finally goes to our PC.
4- LOAD signal to camera (Parameter Register Set Enable)
5- START signal to camera (Start Image Sensing)
6- VCC (all the analog and digital power)
7- SIN signal to write the regs on the camera (Parameter Data Input)
8- RESET signal to camera (Reset Parameter Registers)
9- READ (Image) signal from camera
For more info on these pins, please refer to the image sensor datasheet attached on the next steps. You’ll understand the schematics better when you read the comments in the code files.
For more detail: PC Interfacing a GameBoy Camera using PIC18F4620 microcontroller
Current Project / Post can also be found using:
- M64282FP image sensor