Shop OBEX P1 Docs P2 Docs Learn Events
Tcm8230md — Parallax Forums

Tcm8230md

tholbertontholberton Posts: 41
edited 2012-05-29 19:55 in General Discussion
photo.jpg


Just made a little breakout board to start prototyping the TCM8230MD with the propeller!
Tomorrow I'm going etch the circuit for the three regulators it needs and then Tuesday or
Wednesday I should receive the level translator for the I2C interface. I'm pretty excited, haha
1024 x 768 - 88K

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-27 10:58
    It would be very cool to see one of these cameras used with a Propeller.

    I've had one of these cameras for several years. I haven't gotten as far as making a breakout board for it myself.

    What are the three voltages you need? On the datasheet I see a need for two voltages, 2.8V and 1.5V.

    I wonder if you could get by without an I2C level translator. If you pulled the I2C lines to 2.8V, the Prop would still be able to read it. Since I2C only pulls the line low, the Prop's 3.3V should never be on any of the data lines (assuming no programming errors).

    Do you have a plan for writing software to use with this camera? The datasheet seems a bit intimidating to me. Is there code from a different uC you want to adapt to use with the Prop?

    I've started making PCBs myself (though a fab house). You remind me of my desire to use this camera with the Prop; I think I'll try to have a PCB made for the camera.

    Thanks for posting the picture. I hope you keep us updated on your progress.
  • ercoerco Posts: 20,259
    edited 2012-05-27 11:23
    Nice to hear someone is making some progress, it's a dull, quiet holiday weekend here in the forum. I might have to bust out a new robot! :)
  • User NameUser Name Posts: 1,451
    edited 2012-05-27 14:28
    erco wrote: »
    Nice to hear someone is making some progress, it's a dull, quiet holiday weekend here in the forum.

    I'm taking advantage of the holiday weekend to finish a large shed in which to store the vast quantities of junk I've already made. :)
  • davejamesdavejames Posts: 4,047
    edited 2012-05-27 15:12
    erco wrote: »
    Nice to hear someone is making some progress, it's a dull, quiet holiday weekend here in the forum. I might have to bust out a new robot! :)

    Well - my lovely wife has gone shopping for some new movies to add to our collection. In the meantime (with Nazz softly playing in the background), I'm multiplexing between a burn-in test on a product (the big silver box) and tinkering with a tank tread upgrade to my Boe-BOT.



    ***Edit - oops! Sorry...didn't mean to instigate a thread hijack.:innocent:
    1024 x 683 - 240K
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-05-27 15:26
    erco wrote: »
    Nice to hear someone is making some progress, it's a dull, quiet holiday weekend here in the forum. I might have to bust out a new robot! :)

    I was sentenced to 3 days hard labor and don't even recall upsetting the warden!!

    Back to topic. Looks like a fun project. It's always interesting to see the Propeller stretched in any dimension!

    Btw, welcome to the forums!
  • ercoerco Posts: 20,259
    edited 2012-05-27 17:17
    Well as long as you boyz are keepin' busy and making progress, I can get back to slacking off. Pass me a cold one! :)
  • MacTuxLinMacTuxLin Posts: 821
    edited 2012-05-27 23:28
    tholberton wrote: »
    Just made a little breakout board to start prototyping the TCM8230MD with the propeller!

    Looks cool! Looking forward to the result.
  • tholbertontholberton Posts: 41
    edited 2012-05-28 02:48
    The regulator board is having issues right now. Waiting for some resistors from digikey right now.
    As for the code, I'm going to have one cog drive the I2C and other cogs process the data. Hopefully
    that will give more of a window to process the data.
  • tholbertontholberton Posts: 41
    edited 2012-05-29 00:10
    Duane Degn wrote: »
    I wonder if you could get by without an I2C level translator. If you pulled the I2C lines to 2.8V, the Prop would still be able to read it. Since I2C only pulls the line low, the Prop's 3.3V should never be on any of the data lines (assuming no programming errors).

    soooo... to drive the line high I write?
    mov dira, #1
    
    and to drive it low I then write
    mov dira, #0?
    
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-29 00:54
    tholberton wrote: »
    soooo... to drive the line high I write?
    mov dira, #1
    
    and to drive it low I then write
    mov dira, #0?
    

    Let's assume your I2C bus are on pins P8 and P9. If you defined the pins in a CON section like this:
    CON
    
      I2C_CLOCK = 8
      I2C_DATA = 9
    

    Then early in your PASM code you'd create a mask for these pins. I'll just write code for creating a mask for the clock pin; you'd make a mask for the data pin the same way.
    mov  clockMask, #1
        shl  clockMask, #I2C_CLOCK
    

    With an I2C bus, you'd want both lines pulled high, so you'd connect one end of a 10K resistor to the 2.8V source and the other to P8. A second resistor would be connected to 2.8V and P9. These resistors are now pulling the two lines high. As long as the lines aren't connected to ground they will be in a "high" state so the Propeller pins never need to be driven high. As long as P8 and P9 are inputs, these two lines will stay high (unless some other device like the camera pulls the line low).

    So to communicate on the bus, the Prop sets P8 and P9 low and only changes between being an output and an input to send its logic signals to the camera.

    The pins are in a low state when the Prop is started up so there doesn't need to be any code written to make the pins low. The pins also start as input pins so by doing nothing the lines are high.

    To drive the pins low, the pins are changed from inputs to outputs (again, I'll just show how to code for the clock line).
    or   dira, clockMask
    

    When you want the line high again:
    andn  dira, clockMask
    

    Whenever the line is being driven low by the Prop, no other devices on the line can communicate so the Prop needs to "release" the I2C lines (with the andn dira statment) before listening to the line. I think this type of setup is called "open drain".
  • tholbertontholberton Posts: 41
    edited 2012-05-29 13:43
    Thank you, i'll probably put the level translator there to be safe.
    You also don't haPpen to knOw how to find pin one do you?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-29 13:58
    If you look in the comments, someone describes pin one as having a very small plastic nib on the body. I'll need to find my camera so I can check. I know I've seen it within the last few weeks, I just hope I didn't put it some place safe.
  • tholbertontholberton Posts: 41
    edited 2012-05-29 19:55
    Thanks, just saw the comments.
Sign In or Register to comment.