High speed pic scaler for Survey meter for PIC16F627A translation to PIC18F2855?


Results 1 to 8 of 8

Threaded View

  1. #5
    Seoullasers's Avatar
    Seoullasers Guest


    Did you find this post helpful? Yes | No

    Default Re: High speed pic scaler for Survey meter for PIC16F627A translation to PIC18F2855?

    Sorry for double posting here... I just had another go at editing the pins and finding a 1602 type LCD screen code to add in the beginning of the
    program. I had a look at the ECIO28P and saw different pins assigned. I changed the pins. Could someone have a look at my changes? Thanks. I tried adding this to my previous post, but that is not allowed... no choice.

    'PIC based Scaler for compact board
    '18F2455 16x2 1602LCD
    'V4.0 with configuration for CPS CPM uR and long sample option
    'V5 with count display during scaling
    'v6 skipped
    'V7 moved to PBP3 and bug fixes
    '(c)G8RPI 2011

    DEFINE OSC 20 'set for 10MHz xtal

    Not sure what I set the speed to I am wanting to set the speed to 48Mhz. but this is the internal clock. 4Mhz is external. Do I DEFINE OSC 20 'set for 4MHz xtal' ?
    What about the internal clock? How does one use that?

    DEFINE LCD_DREG PORTA ' LCD on port a
    DEFINE LCD_DBIT 0 ' Data bits A0..A3
    DEFINE LCD_RSREG PORTA ' RS on PORTA
    DEFINE LCD_RSBIT 1 ' RS on A1
    DEFINE LCD_EREG PORTA ' E on PORTA
    DEFINE LCD_EBIT 2 ' E on A2
    DEFINE LCD_BITS 4 ' LCD 4 bit mode
    DEFINE LCD_LINES 2 ' 2 line LCD display
    Define LCD_COMMANDUS 2000 ' Command Delay (uS)
    Define LCD_DATAUS 50 ' Data Delay (uS)


    LCDOUT $FE,1:PAUSE 3000:LCDOUT $FE,1 ' Initialize LCD WITH HUGE PAUSE !!!
    Pause 3000 ' AND AGAIN ...
    LcdOut $FE, $80," DUAL TERMOMETER "
    LcdOut $FE, $C0," AND THERMOSTAT "
    PAUSE 5000 ' AND AGAIN ...
    LCDOUT $FE, 1, $FE, $0C ' Clear display, cursor off
    Pause 1000

    input portB.3 'set to input as the board connects this pin (9) to the LM358 output pin 7
    input portB.0
    input portB.6
    input portA.4 'Switch input

    OPTION_REG.7 = 0 'Set portB weak pull-up on

    'Pins 10,11,12,13,14 are not connected
    'Pin 20 RB.0 is used to enter configuration
    'Pin 26 RB.6/T1CKI connected to Pin 9 and LM358 pin 7
    Last edited by Seoullasers; - 25th February 2017 at 06:40.

Similar Threads

  1. High Speed Oscillator question
    By Tina10 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th July 2012, 10:29
  2. Pic based Wind Speed meter
    By Bobbo_ZA in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 1st November 2011, 15:14
  3. Replies: 0
    Last Post: - 7th August 2008, 09:02
  4. High Speed Serial Comm PC - PIC and PIC - PIC
    By manumenzella in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 16th January 2007, 21:55
  5. Need help, high speed D/A converter, see code
    By rpatel in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 20th December 2004, 01: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