Application Note - 20B45X Series

Application Note - 20B45X Series
IMAGING SOLUTIONS INC.
Original Equipment Manufacturer
Application Note
20B45X Series
20B45 series
20B45M series
Prior to Using This Document: Videology reserves the right to modify the information in this
document as necessary and without notice. It is the user’s responsibility to be certain they possess the
most recent version of this document by going to www.videologyinc.com, searching for the model
number, and comparing revision letters on the respective document, located in the document’s footer.
For technical assistance with this product, please contact the supplier from whom the product was
purchased.
Videology Imaging Solutions, Inc. USA
37M Lark Industrial Parkway
Greenville, RI 02828
Tel: 401-949-5332
Fax: 401-949-5276
www.videologyinc.com
Doc # APN-20/21B45 series
Revision: A
Videology Imaging Solutions, B.V. Europe
Neutronenlaan 4
NL-5405 NH Uden, Netherlands
Tel: +31 (0) 413-256261
Fax: +31 (0) 413-251712
www.videology.nl
Issue Date: 03/28/2011
Page 1 of 10
Table Of Contents
Document History ................................................................................................................. 3
Description........................................................................................................................... 3
Setting The Functions ............................................................................................................ 3
Camera Modes ...................................................................................................................... 4
Camera Control for 20/21B45 camera ...................................................................................... 6
5.1.
Installation .................................................................................................................... 6
5.2.
Run the Software............................................................................................................ 6
5.3.
Connect ........................................................................................................................ 7
5.4.
Overlay Functions ........................................................................................................... 7
5.5.
Auto Exposure Settings (AEX) .......................................................................................... 7
5.6.
Mirror and Flip................................................................................................................ 8
5.7.
White Balance ................................................................................................................ 8
5.8.
General Communication................................................................................................... 8
5.9.
I2C Addresses ................................................................................................................ 9
6. Contact Information ............................................................................................................ 10
1.
2.
3.
4.
5.
Doc # APN-20/21B45 series
Revision: A
Issue Date: 03/28/2011
Page 2 of 10
1. Document History
Revision Issue Date Reason
Rev A
09-19-07
Initial release (Videology Europe rev 2.0 3/1/2011),
added Camera Controls (Videology Europe rev 1.0 2/8/2010)
CN#
11-0025
2. Description
This is a description to set or change some of the settings inside the camera module.
The settings which can be changed are:






Mirror, this is a horizontal flip of the image
Flip, this is a vertical flip of the image
Auto exposure saturation point
Shutter speed
AWB auto and freeze mode
Enable/disable overlay
3. Setting The Functions
To set these functions and store them in the camera we strongly recommend to use the software tool
“2XB45 camera control" SFT-11004. This is available via Videology website. The advantage is that
settings can be stored easier inside the camera when you use this tool, without the risk of damaging the
camera.
However in case you need to switch dynamically in your application certain modes, you have to address
the camera via I2C.
The communication protocol has a device address, two register addresses and two data bytes.
See figure 1.
Write action
S
Device addrW
A
reg byte 1
A
Reg byte 2
A
Data byte1
A
Data byte2
A
P
Read action
S
Device addrR
A
reg byte 1
A
Reg byte 2
A
Data byte1
A
Data byte2
nA
P
A= acknowledge
nA=Not acknowledge
S= Start condition
P=Stop condition
Figure 1.
Clock speed should not go above 100KHz!.
The device address for writing is 0xBA and for reading is 0xBB.
Doc # APN-20/21B45 series
Revision: A
Issue Date: 03/28/2011
Page 3 of 10
4. Camera Modes
In the tables below you find per command the required actions to change the camera mode:
Mirror mode:
1. Read register 0x3254
2. Read register 0x301c (mirror status = bit[0] (0=normal, 1=mirror)
3. If mode needs to be changed
a. Set register 0x301c bit[0] accordingly. All other bits should NOT be changed.
Set register 0x3254 bit[0]. Incase of mirror b[0]=1, in normal mode b[0]=0. All other bits should NOT
be changed.
Flip mode:
1. Read register 0x3254.
2. Read register 0x301c (flip status = bit[1] (0=normal, 1=flip)
3. If mode needs to be changed:
a. Set register 0x301c bit[1] accordingly. All other bits should not be changed.
Set register 0x3254. In case of flip b[1] = 1, in normal mode b[1] = 0;
Auto exposure saturation point
1. Read register 0xa804 to check if the camera is in AEX mode. Value 0x000f is AEX mode, 0x0000
is manual exposure mode.
2. If mode is not correct load register 0xa804 with 0x000f.
3. Read current saturation point from register 0xa812
Load register 0xa812 with the new saturation level data
Shutter speed
1. Read register 0xa804 to check if the camera is in manual mode. Value 0x000f is AEX mode,
0x0000 is manual exposure mode.
2. If mode is not manual load register 0xa804 with 0x0000.
3. Read current shutter value from register 0x3012.
Load register 0x3012 with the new shutter value
Auto white balance mode
1. Read the current white balance mode status from register 0xac04 (if value is 0x00ff than it is
Auto white balance mode).
If mode is not correct load register 0xac04 with value 0x00ff.
Freeze mode:
To use this mode the camera must be first put in the freeze mode. The camera first needs to run in
AWB mode. It will look for the most optimal white balance setting. When this is reached the AWB must
be hold, and preferable the R/B gains must be stored and used when the camera is powered up again.
Put the camera in the freeze mode:
1. Make sure camera is in AWB mode by reading register 0xac04. Value 0x00ff means AWB mode. If the camera is not in the correct mode see table Auto White balance Mode. 2. If the AWB reached it’s most optimal position stop the AWB function by loading register 0xac04 with value 0x0000. 3. Wait 10 mSec. 4. Read the following registers: 0xac02, 0xac04, 0xac0a, 0xac0c, 0xac0e, 0xac10, 0xac12, 0xac14, 0xac16, 0xac18, 0xac10, 0xac1a, 0xac1c, 0xac1e, 0xac32, 0xac36, 0xac38, 0xac3a, 0xac3c, 0xac3e, 0xac40, 0xac42, 0xac44, 0xac46, 0xac48, 0xac4a, 0xac4c and 0xac4e. wait 5 mS between each read command. These values must be stored so that the can be loaded when the camera is powered up.
Doc # APN-20/21B45 series
Revision: A
Issue Date: 03/28/2011
Page 4 of 10
Enable or disable overlay
In the camera 4 overlay images can be stored. Depending on the situation overlay’s can be enabled or
disabled. Note that these overlay images must be loaded by Videology. Please contact us for more
information.
Global enabling of the overlay’s: The camera can have up to 4 images loaded. By disabling the global
overlay functions all active overlays will be stopped in one command.
1. Read current status global overlay by reading register 0x4f02. If the MSbit (b[15] is set the
global overlay is active. This does not mean that the overlays are visible. Also the individual
overlay must be active to make the visible.
Enable the global overlay by loading register 0x4f02 with value 0x8000, or disable global overlay by
loading register 0x4f02 with 0x0000.
Enabling individual overlays:
As mentioned above the camera can be loaded with maximum 4 overlay images. This can all be
enabled or disabled individually.
1. Each overlay has its own overlay enable address. Overlay1 = 0x4f08, overlay2 = 0x4f0a,
overlay3 = 0x4f0c and overlay4 = 0x4f0e. To read the status per overlay read the
corresponding address. The MSbit (b[15]) indicates the status. 1 overlay is enabled, 0 overlay is
disabled.
2. Set each overlay as required by setting in each register b[15] to the desired enable or disable
mode.
3. The lowest two bits indicates which overlay should be loaded. We advise to use the following
values for the lowest two bits per register:
 in reg 0x4f08b[1,0] = 00
 in reg 0x4f0ab[1,0] = 01
 in reg 0x4f0cb[1,0] = 10
in reg 0x4f0eb[1,0] = 3
If settings need to be stored:
You can use the camera’s EEprom to store your settings. Please be careful when you do this. The camera
has an 8K EEprom on board, which is 4 pages. The last page is meant to store certain settings. But this
page may contain settings already stored from the factory! You should not overwrite the factory settings,
since this may influence the start up and final behavior of the camera!
To find out if settings are loaded , read from the EEProm. Settings are stored in groups of 4 bytes (two
register address bytes and two data bytes). Keep reading until you find a group of 4 bytes with all 0xff.
Here you should start storing your values. Do not leave unused spaces!!!
In figure two you find a graphical example:
addr
data
0x0
D1
0x 1
D2
0x 2
D3
0x 3
D4
0x 4
0xff
0x 5
0xff
0x 6
0xff
0x 7
0xff
0x 8
0xff
0x 9
0xff
0xa
0xff
First address to load your settings
Figure 2.
Note that you always should store 4 bytes in the following order: Reg Addr MSB, Reg.Addr LSB, Data MSB
and Data LSB. So in the case of figure two the MSB of the register address must be stored in register
0x04.
Please be very careful when you store settings. We recommend using Videology’s 2XB45 camera control
software (SFT-11004).
Please note: Videology will not give any warranty in case settings are stored incorrectly, or settings are
overwritten!
The Eeprom has a different I2C format. The register addresses and data addresses are only one byte. The
device address for the EEProm page 4 is 0xa6 (write) and 0xa7 (read).
Doc # APN-20/21B45 series
Revision: A
Issue Date: 03/28/2011
Page 5 of 10
5. Camera Control for 20/21B45 camera
Videology's new 20/21B45 camera is equipped with a I2C interface which several functions can be
controlled. To set these features you will need to use the software: SFT-11004.
5.1.
Installation
The software package contains two files: 2xB44Cntrl.exe and inpout32.dll. Not installation required, only
make sure that both files are in the same folder before the program is started.
5.2.
Steps
1.
2.
3.
4.
5.
Run the Software
for running the software:
Connect camera to monitor
Connect power (either 3.3 or 5V ) to the camera
Connect the 25pin cable to the printer port of the computer
Connect other end of 25 pin cable to I2C programming board
Connect 7 pin connector into the I2C programming board
To start the program click on the icon (shown here below).
After you double clicked the icon the following window will open:
If the software started well and the camera is connected correctly, the window will show the actual
settings that are stored in the camera.
Doc # APN-20/21B45 series
Revision: A
Issue Date: 03/28/2011
Page 6 of 10
5.3.
Connect
In case the camera was not connected yet when the software was started, or a communication error
occurred you can re-connect to the camera by pushing the connect button.
The tool will load the configuration from the camera and will set the buttons and check boxes accordingly.
5.4.
Overlay Functions
The camera can be loaded with maximal 4 different overlay graphics. Please note that they must be
loaded inside the camera during the production process. For more details please contact your Videology
customer service representative.
To control the overlay graphics you can click one of the check boxes:
The check box for "enable overlay" is the global enable. If this is unchecked, none of the overlays will be
visible. If the global overlay is checked you can select via the other 4 which overlay you want to be visible
(if they are loaded).
5.5.
Auto Exposure Settings (AEX)
The camera offers two types of exposure: they are auto exposure and manual exposure. The camera will
run in Auto exposure mode if the check box “Manual Exposure" is not checked. In this case the user can
set the working point of the camera. Either by changing the scroll-bar AEX ref or editing the edit box at
the right hand side of the scroll-bar. Nominal value for this setting is 0x48.
In the case manual Exposure is checked, the auto exposure routine is stopped and the camera will stay
with the gain at its current position. The rolling shutter exposure time can be controlled with the scrollbar "Man.Shutt” (Manual shutter). This can also be done with the edit box at the right hand side of the
scroll-bar.
Doc # APN-20/21B45 series
Revision: A
Issue Date: 03/28/2011
Page 7 of 10
5.6.
Mirror and Flip
To exchange the orientation of the camera in horizontal direction check the "Mirror" check box. For vertical
use the "Flip" check box.
5.7.
White Balance
The default mode for the camera is the auto white balance mode. However, if the camera is always used
under one fixed specific type of light you can un-check the ( Auto White Balance) box.
In the box for white balance mode you see that this changes from AWB! To Push2White running. This
means that the auto mode is still running till you push the "Push2White" button. At that moment the auto
mode will stop and the current reached settings will be hold inside the sensor (note they are not stored
yet!). The text in the window will change to "P2W = set".
If you are not satisfied with the current settings press the "Push2White" button again, the system will
start running again.
5.8.
General Communication
In this block you can load if required an EEPROM file. Only use a file that you received from Videology.
Loading another file can cause that you camera will not work anymore!
The "erase Eepr" button will erase all special settings of the camera. If you do not want to erase all, you
can set an offset address.
The TV mode box indicates if your camera is PAL or NTSC.
With the "Save" button you can save all settings you made via this tool (outside the General area!) in the
EEPROM of the camera. Please note at the moment you press Save, previous setting will be erased and
overwritten.
Via the Direct I2C communication area you can send direct I2C commands to the camera. This tool lets
you set registers, read registers and modify the EEPROM. You should only use this part if you are very
familiar with the sensor and the camera.
Writing wrong data to the EEPROM can cause the camera not to work anymore! Therefore we
strongly recommend not the use this part of the tool.
Doc # APN-20/21B45 series
Revision: A
Issue Date: 03/28/2011
Page 8 of 10
5.9.
I2C Addresses
If you want to develop you own software to control the camera you need to know the following details:
Communication to the sensor: I2C write address = 0xBA, read address = 0xBB.
The register addresses are 16 bits (2 bytes- 2 x 8 bits). Also data is 16 bits.
The EEPROM uses max 8Kbites. These 8K are divided over 4 pages of each 256 bytes.
The register addresses of the eeprom are 8 bites (one byte). This is also the case of for the data. However
page write and read can be done on the eeprom.
The addresses are:
page 0 : write
page 1 : write
page 2 : write
page 3 : write
0xa0
0xa2
0xa4
0xa6
read
read
read
read
Doc # APN-20/21B45 series
Revision: A
0xa1
0xa3
0xa5
0xa7
Issue Date: 03/28/2011
Page 9 of 10
6. Contact Information
For technical assistance with this product, please contact the supplier from whom the product
was purchased.
For OEM inquiries, contact Videology Imaging Solutions:
North / South America:
Europe:
Videology Imaging Solutions Inc.
37M Lark Industrial Parkway
Greenville, RI 02828
USA
Tel: (401) 949-5332
Fax: (401) 949-5276
Videology Imaging Solutions Europe
Neutronenlaan 4
NL-5405 NH Uden,
Netherlands
Tel: +31 (0) 413 256 261
Fax: +31 (0) 413 251 712
Please visit our website at: http://www.videologyinc.com
VIDEOLOGY IMAGING SOLUTIONS is an ISO 9001 registered video camera developer and
manufacturer serving industrial, machine vision, biometric, security, and specialty OEM markets.
Videology designs, develops, manufactures, and distributes video, image acquisition, and display
technologies and products to OEMs worldwide.
Doc # APN-20/21B45 series
Revision: A
Issue Date: 03/28/2011
Page 10 of 10
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising