Shop OBEX P1 Docs P2 Docs Learn Events
Running a VP i2cmm in 4MHz?? — Parallax Forums

Running a VP i2cmm in 4MHz??

SergioSergio Posts: 3
edited 2007-01-31 10:54 in General Discussion
icon8.gif
···· Hola Guys, I´ve been programming for a long time in assembler, so I have a little practice., but programming time based interrupts in the SX28 in VP, is driving me crazy. I´m using· a Scenix VP I2cmm found in internet, that works in 50Mhz, with an intperiod of 86. The question is, How can I make it work with a 4Mhz resonator? With the guide of Daubach book, I calculate an intperiod of 7!!
I´m trying to conmunicate to SX28 with i2c but power comsuption is very important. Can you help me??
I include the file for reference.
THANKS (Perhaps it´s a stupid question, but I´m stuck)

Comments

  • BeanBean Posts: 8,129
    edited 2007-01-31 01:51
    Sergio,
    Does your application need to be multi-master ?
    Does your application need to have the I2C in an interrupt ?

    If the answer is no to both, then you can "borrow" the I2C code from SX/B. I2CSTART, I2CSTOP, I2CSEND, I2CRECV are the SX/B commands.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1

    "USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
  • SergioSergio Posts: 3
    edited 2007-01-31 03:48
    Dear Bean, thanks for answer so fast.
    The answer to both questions is YES.
    My proyect needs two boards communicating to each other, with minimum wires (3 or 4), or if possible with RF.They must transfer info between each other,so each of them can act as master or slave. I also need to inplement an UART to download info. to a PC. I´m thinking of using only a UART tX rutine , because I only need to take data out.
    As you see, I need a lot of things.... but I¨ll try..
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2007-01-31 10:54
    Sergio,

    IMO, it is not necessary to use a VP for I²C communication, as there is no exact SCL frequency required. You can even realize a Master/Slave configuration. In my book, I have described a system where two or more components on the I²C bus can act as masters, e.g. the main controller, and a push-button unit, and a potentiometer unit.

    For the UART, you should use a VP, as timing is critical. When you only need a transmitter, baud rates up to 9600 will be no problem at 4 MHz clock, provided you are using an external crystal or resonator, as the SX-internel RC clock is not stable enough.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    Günther
Sign In or Register to comment.