Problem with 16F648A


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Location
    GREECE
    Posts
    120


    Did you find this post helpful? Yes | No

    Thumbs down

    My friend duncan303,

    Last I looked the 16F628 didn't have A/D Converters and as such doesn't have ADCON Registers - but you might want to correct me on that...


    Nikos

  2. #2
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    hi Nikos,

    Are you on 16F628 or on the 16F648A, they are not identical the datasheets are similar but differrent, one is the A series.

    No matter, I have got the 16F62X sheet open at the moment, the register associated with the PortA is listed on page 34 table 5.2, therefore you will be looking at the CMCON register, if you look in the PBP manual on page 10 it will help explain better than I can right now, just off for my Sunday roast


    Mmm hungry

    Duncan

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi ngeronikolos,
    Please read this thread:
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    You will see to use internal Osc does not require you to set osc to HS, are you doing that manualy in the programmers fuse?, I ask because of your comment in define statement?
    Early in your code put CMCON = 7 to disable comparators.
    your statement:
    Code:
    'constants for RF configuration modes
    CONRFRX var byte
    CONRFTX var byte
    these are set as variables not constants.
    Call to nonexistant sub directory: GOSUB initRFConfig
    What is " mpla " ?
    your
    Code:
     'constants to define receive/transmit modes at 2402 Mhz frequency
    CONRFTX = $04
    RFCurrentState = CONRFTX
    If you had properly set those as constants, I do not think you could redefine them later in code, since you set them as VAR it works. to make them constants just rewrite as:
    Code:
     CONRFTX CON $04
    'at the beginning, then you give the variable RFCurrentState it's value as above RFCurrentState = CONRFTX .
    This is your statament:
    @ DEVICE pic16F648A, INTRC_OSC_NOCLKOUT ' system clock options
    Change to :
    @ DEVICE pic16F648A, INTOSC_OSC_NOCLKOUT ' use internal OSC instead of R/C osc
    If you installed everything in the default places when you setup PBP then you should find a file called P16F648A in this directory:C:\Program Files\Microchip\MPASM Suite , open it and look at the last several lines to see all available config fuses for this chip.
    Last edited by Archangel; - 2nd March 2008 at 19:57.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. Code doesn't work on 16F648A
    By Mr_Joe in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st September 2018, 22:09
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  3. Hardware problem or what ?
    By Steve S. in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 4th March 2007, 21:39
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. weird 12F629/675 problem
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 7th October 2004, 01:08

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