MSCcam Buildinfo

From Merlin Systems Wiki

Build information for the MSCcam embedded camera

Contents

GOTCHA NOTES

  • Program mega8 first, or programmer loses comms with the Mega64 when it first programs it
  • Needs camera board attached (for same reasons)
  • special 16-way robot-to-camera lead needed (see below)

Build notes

  • current board has several patches to make - see "msccam1v0a PATCHES SINCE v1.brd"
  • the board is tracked for different output alternatives : for radio connection, the build is different. See "msccam1v0a PRO-ONLY.brd" for pro version.

Construction Test sequence

programming + camera/mega64 interfacing

  • First power up from 16-way plug with 5V on it + check current (~50mA typical?)
  • Connect Mega8 programming lead to 6-pin holes + program Mega8
(as usual, may need to apply sideways pressure to ensure good connection)
  • Connect programming lead to Mega64 via standard 16-way header through the power plug
when programmed, the lower LED on the board should flash 3 times, then (after a slightly longer delay) come on again + stay on.

basic comms (comms lead + Mega8 operation)

  • To test for Pro comms with Mega8, type [iA0=0]
it should succeed = responds "<i>", NB error message is "<i=1>"
  • To test for Mega8 I2C interface working properly, type [iA0=1] [iA0?20]
it should respond with i2c registers info from the Mega8, like "<iA0: 04 20 ...>"

inter-chip comms and Mega64 operation

  • To talk to Mega64, type [X] -pro should respond eg "<START TERMINAL..."
  • Hit <return> + you should get "NCK" outputs (=no-acknowledge =comms ok, unrecognised command)
- the camera board will also light the top LED to show it receives serial data from the Mega8
  • Type PG<return> + you should get "ACK" outputs ('ping' command -> ack)
  • ( Hit <ESCAPE> to get out of terminal mode -> "...TERMINAL ENDS>" )

camera operation

  • Get Pro into 'terminal' mode (as above), then disconnect Hyperterminal from the port
  • Run up "AVRcam View"
  • Hit 'Connect', select comport + hit 'OK'
  • - should see 'ACK' appear on rhs terminal screen
  • Hit 'CAPTURE' - should bring up a window which fills with picture
  • Test colormap download + tracking...
    • Select 'View\Show Color Map'
    • on ColorMap window, hit "Send"
    • hit 'Enable Tracking'
    • - it can track 'red-ish' things?
    • hit 'Disable Tracking', 'Disconnect' + close down

Common Problems

  • programmer can't find Mega64 : Maybe no external clock from camera, either bad connections or Mega8 isn't starting up the camera.
  • Mega64 doesn't flash LED on powerup : similar problems
  • Mega64 doesn't complete flash-sequence on powerup : ???CAUSE UNKNOWN???
    (Happened once - cured on re-program : OR COULD BE - hangs talking to camera (?m64 pins bad joint))
  • Mega64 doesn't respond to typed commands (== doesn't even light the top LED?)
    •  ? Pro not in terminal mode
    • Mega8 serial speed wrong : this is (1) adjustable (2) depends on RC oscillator speed
try running "FixSpeedSettings.bat" (in "C:\WinAVR_projects\msccam\msccam main\msccam mega8\Trunk")


PCB schematics + layout

(not yet linked)

Programming Info + Files

MSCCam Programming

Robot Connecting Lead

MSCcam_Robot_Lead_Construction