GameBoy Camera

Hello,
how are you? I have a question about the GameBoy camera, did anybody interface it with PIC 16F877A and pic basic pro? I made a code for it but
isn't working. I think I don't know how to set the registers so it can start to send me anolog voltage? Can anybody help me? I can show you the code if you want.
Thank you
--
Best regards,
Refik Hadzialic
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Refik, I had some luck with a GB camera and an 8 bit pic. I got analog voltages out but never completed the project. Make sure your hardware is set up properly first. I remember needing one pin pulled up to 5 Vdc. Do you have a schematic of your circuit? I'll dig up my stuff if you want. -Mike
Refik Hadzialic wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Dear Mike,
thank you for the reply. I used a PIC 16LF877A because of the intern A2D Converter. I connected the camera to the pic dirrectly without anything to pull up?!?
Can you send me your shematics, please? And one more question do I have to use another A2D converter because the one in the PIC is to slow? Every help is welcome :) Thank you Mike
Here is the code I used:
INCLUDE "modedefs.bas" 'INCLUDE THIS FILE, USED FOR SERIAL PORT COMMUNICATION PIC-PC DEFINE OSC 20 'DEFINE THE OSCILLATOR 20 MHz
DEFINE ADC_BITS 8 'DEFINE RESOLUTION OF A2D CONVERTER DEFINE ADC_CLOCK 0
TRISA = $FF 'DEFINE TRISA AS INPUT $FF%5 ADCON1 = 0 'PORT A SHOULD BE ANALOG
'DEFINE ALL THE NAMES OF PORTS WHICH WILL BE USED TO CONTROL THE CAMERA symbol GB_LOAD = PORTB.7 SYMBOL GB_READ = PORTB.6 SYMBOL GB_XCK = PORTB.5 SYMBOL GB_START = PORTB.4 SYMBOL GB_SIN = PORTB.3 SYMBOL GB_RESET = PORTB.2 SYMBOL SERIAL_PORT = PORTB.1
'DEFINE FOR LOOP I VAR WORD RESULT_PIXEL VAR BYTE
MAIN:
'START THE CAMERA HIGH GB_RESET LOW GB_SIN LOW GB_LOAD LOW GB_XCK LOW GB_START
'RESET THE CAMERA LOW GB_RESET HIGH GB_XCK HIGH GB_RESET LOW GB_XCK
'ENTER THE REGISTERS 'ADDRESS 1 LOW GB_XCK LOW GB_SIN high GB_XCK low GB_XCK
LOW GB_SIN high GB_XCK low GB_XCK
LOW GB_SIN high GB_XCK low GB_XCK
'REGISTER 1 HIGH GB_SIN high GB_XCK low GB_XCK
LOW GB_SIN high GB_XCK low GB_XCK
LOW GB_SIN high GB_XCK low GB_XCK
LOW GB_SIN high GB_XCK low GB_XCK
LOW GB_SIN high GB_XCK low GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_LOAD HIGH GB_XCK LOW GB_XCK LOW GB_LOAD
'ADDRESS 2 LOW GB_XCK LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
'REGISTER 2 LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_LOAD HIGH GB_XCK LOW GB_XCK LOW GB_LOAD
'ADDRESS 3 LOW GB_XCK LOW GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
'REGISTER 3 LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_LOAD HIGH GB_XCK LOW GB_XCK LOW GB_LOAD
'ADDRESS 4 LOW GB_XCK LOW GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
'REGISTER 4 LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_LOAD HIGH GB_XCK LOW GB_XCK LOW GB_LOAD
'ADDRESS 5 LOW GB_XCK HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
'REGISTER 5 LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_LOAD HIGH GB_XCK LOW GB_XCK LOW GB_LOAD
'ADDRESS 6 LOW GB_XCK HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
'REGISTER 6 LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_LOAD HIGH GB_XCK LOW GB_XCK LOW GB_LOAD
'ADDRESS 7 LOW GB_XCK HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
'REGISTER 7 LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_LOAD HIGH GB_XCK LOW GB_XCK LOW GB_LOAD
'ADDRESS 8 LOW GB_XCK HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
'REGISTER 8 LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
LOW GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_XCK LOW GB_XCK
HIGH GB_SIN HIGH GB_LOAD HIGH GB_XCK LOW GB_XCK LOW GB_LOAD
'PAUSE 12 MILISECONDS SO THE CAMERA INITIALIZES THE SETTINGS PAUSE 12
'GIVE THE CAMERA SIGNAL TO TAKE PICTURE HIGH GB_START HIGH GB_XCK LOW GB_START LOW GB_XCK
'WAIT 12 MILISECONDS SO THE CAMERA TAKES THE SNAPSHOT PAUSE 12
''LOOK IF READ IS 1 WHILE GB_READ = 0
WEND
'STORE THE PICTURE TO THE EEPROM FOR I = 1 TO 2000 HIGH GB_XCK ADCIN 0, RESULT_PIXEL WRITE I, RESULT_PIXEL LOW GB_XCK NEXT I
FOR I = 1 TO 2000 READ I, RESULT_PIXEL SEROUT SERIAL_PORT, N9600, [#RESULT_PIXEL] NEXT I
END

but
start
if
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.