I2C write - value too big


Results 1 to 20 of 20

Threaded View

  1. #10
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    i'm a bit surprised you don't have any compilation errors...
    a) 2 mistyped IF statements,
    b) it miss Readmenu, recordmenu, timing section,
    c) and as Sayzer point-out.. those goto are a bit weird... and in case you remove Goto timing... it will branch to the startMenu indeed... but you will always add 1 on the Stack.. shortly it will overflow...

    Code:
    OSCTUNE=0
    why? You don't need to do it unless you want to calibrate the internal OSC, just remove it. Almost sure your Serial comm wasn't working really well huh? (DEFINES aren't in caps either.. but it can be a paste error)

    Code:
    I2CREAD SDA,SCL,CTW,ADDR.highbyte,addr.lowbyte,[tempe]
    Why do you split addr in 2 ?
    Code:
    I2CREAD SDA,SCL,CTW,ADDR,[tempe]
    This have to be changed in ALL I2CREAD AND I2CWRITE lines

    This must be written the right way.. unless YOU will have problem indeed.
    Last edited by mister_e; - 6th April 2008 at 11:23.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 23:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 22:07
  3. Replies: 5
    Last Post: - 29th May 2008, 19:03
  4. PIC16F877 I2C programme
    By cooqo in forum mel PIC BASIC
    Replies: 3
    Last Post: - 21st April 2008, 11:02
  5. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 20:33

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts