Connecting a BW 320x320 Pixels Camera Arducam HM01B0 to Parallax Propeller P2 via 4 Lines
Datasheet: https://www.uctronics.com/download/Datasheet/HM01B0-MWA-image-sensor-datasheet.pdf
This is a black and white Camera Module, which has I2C to set/read registers and can be configured to use a single D0 data connection with a 24MHz synchronous clock line. Thus 4 lines is enough to interface with a microcontroller.
It sends 8bit grey scale values for each pixel. Natively it has a resolution of 320x320 pixels (105kBytes). Also it supports onboard averaging to a 160x120 pixel format, giving 19.200 bytes per picture.
I has automatic exposure by default.
Thanks to P2 Smart Pin Mode for Sync Serial and the great help I got ( https://forums.parallax.com/discussion/178022/synchronous-shift-in-with-external-clock-is-there-a-simple-example#latest ) the serial interface turns out to be totally simple, if you use "gated clock" mode to grab single pictures.
In my setup I use a dedicated I2C bus at ports 33+35. Serial picture data is port 37, Serial picture clock is port 39. In addition GND and 3V3 has to be supplied to the camera. Power consumption is low.
The demo code shows the picture with a ASCII character grey scale.
This is my coffee mug.
The HM01B0 camera gives improved experience in comparison to the OV7670. ( https://forums.parallax.com/discussion/175897/thoughts-about-robot-navigation-using-blinking-beacons-and-camera-s#latest ) Documentation in the datasheet is much better and it works better with low light.
For this I used Spin Tools IDE 0.53.0
Cheers Christof

