+ Reply to Thread
Results 1 to 4 of 4

Thread: change program from 16f84a to 16f818

  1. #1
    Totally blank Newbie
    Join Date
    Oct 2007
    Posts
    10

    Default change program from 16f84a to 16f818

    Hi

    Since my last posts I have had some great help from a member here to get my project off the ground, we decided pots would be best for speed and stroke so had to upgrade to the 16f818 chip

    The problem now is just running a basic set of commands

    Code:
    loop:
    StepCCW 150, 1000
    WaitUs 1000
    
    StepCW 150, 1000
    WaitUs 1000
    
    Goto loop
    
    The above works 100% with the 84a BUT when using it in the 818 it stutters, searches, just generally behaves very erratic.

    The 84a has a 4meg OSC the 818 needs to be set so we added this to the top of the file

    Code:
    OSCCON = 0x60
    
    It is still verry erratic, am I missing something?

    I am using the Oshonsoft Bacis compiler and ICProg

    ICProg settings are intRC, CP Off, WRT Off, FUSES: PWRT & MCLR are ticked and the rest are unticked.

    Any help would be greatfully appreciated, thanks


  2. #2
    Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent
    Join Date
    Mar 2005
    Location
    Brisbane Australia
    Posts
    6,805

    Default

    Have you setup ADCON1 so you have the correct pins as analogue or digital?

    Mike.

  3. #3
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,836
    Blog Entries
    13

    Default

    hi,
    Did you get my email regarding what is connected to PIC pins 15/16 on the 16F84A socket??
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

  4. #4
    Totally blank Newbie
    Join Date
    Oct 2007
    Posts
    10

    Default

    Hi Mike / Eric

    Mike ADCON1 = 0x05

    Eric, yes and I sent you a reply with an image attached,let me know if you get it.

+ Reply to Thread

Similar Threads

  1. Question about Inchworm+
    By Quan in forum Micro Controllers
    Replies: 54
    Latest: 28th October 2007, 12:21 AM
  2. First Program in assembly, And Programmer Inchworm.
    By Ayne in forum Micro Controllers
    Replies: 10
    Latest: 9th March 2007, 07:27 PM
  3. 16F84A programming error using P16PRO40
    By rizzy in forum Micro Controllers
    Replies: 21
    Latest: 11th December 2004, 06:17 AM
  4. schematic & program to program pic 16f84a plz
    By mafiaaa in forum Micro Controllers
    Replies: 2
    Latest: 27th November 2004, 04:00 PM
  5. PicBasic Keypad program
    By Sora in forum Micro Controllers
    Replies: 0
    Latest: 20th April 2004, 07:02 PM

Tags for this Thread