Read the newbee threads, 16F877A no go.


Closed Thread
Results 1 to 40 of 40

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Going through the forum posts, I encountered the same problem as in Post#21 above.

    Here is the simple code trying to write to DS1307.

    Code:
    Start:
    
    I2CREAD PORTA.3,PORTA.2,$D0,0,[0,0,0,0,0,0,0]
    
    GOTO Start
    
    
    END

    I get;
    ERROR Line 16: Expected '['. (Untitled8.pbp)
    ERROR Line 16: Expected ']'. (Untitled8.pbp)

    No variable or alias; just direct values...

    What is the cause of this issue?
    me?


    Thanks.
    -------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Aw c'mon Sayzer, that's a no-brainer...

    Too much wine, women and song this festive period...

    You're trying to READ from a device, and then attempting to store that data into a series of CONSTANTS??? Maybe that's where CONSTANTinople comes from...

    I prescribe a large mug of Turkish coffee and a code revision to something like...
    Code:
    	dA var BYTE
    	dB var BYTE
    	dC var BYTE
    	dD var BYTE
    	dE var BYTE
    	dF var BYTE
    	dG var BYTE
    	
    Start:
    
    	I2CREAD PORTA.3,PORTA.2,$D0,0,[dA,dB,dC,dD,dE,dF,dG]
    
    	GOTO Start
    
    	END
    Alternativelty swap IC2READ with I2CWRITE if you are really intending to WRITE.

    Happy Holidays everyone!

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Unhappy

    Quote Originally Posted by Melanie Newman she who prescribes a large mug of Turkish coffee.
    Alternativelty swap IC2READ with I2CWRITE if you are really intending to WRITE.

    What can I say?

    I wanna cry :'(


    ------------------------
    Last edited by sayzer; - 28th December 2006 at 15:33.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. Cleaning up code
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2009, 07:14
  3. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  4. Q: using MCLR for Input on 12F683
    By picster in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 31st January 2009, 15:25
  5. Changing declared variables names on the fly
    By jessey in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th December 2006, 06:34

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