Read the newbee threads, 16F877A no go.


Closed Thread
Results 1 to 40 of 40

Hybrid View

  1. #1
    BobbyA's Avatar
    BobbyA Guest


    Did you find this post helpful? Yes | No

    Default Switches

    Hi Melanie,

    As I said I'm a newbee to PBP, and it's still not clear to me the purpose of the c:\PBP\INC\M16F87xA.INC vs. the C:\PBP\16F877A.INC file.

    I do know the suggested fix was to edit the xt_osc to be hs_osc in light of the clock speed used, and to check the Special Features section of the datasheet. While in the PIC datasheet I noticed there were other configuration bit options that didn't have entries in that file.
    So I stand by the statement, "the datasheet calls out many configuration bit switches that are not addressed in the c:\pbp\16F877A.INC file, when using PM."

    Maybe they don't need to be there, I'm not well versed yet on the effect each configuration bit has on PIC performance. I have to assume if they were not included in this file they are not critical for simple functioning, same with an initial set or cleared condition. This may yet lead me to grief.

    BR,
    Bobby

  2. #2
    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

  3. #3
    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!

  4. #4
    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