18F series performance not so good?


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,132


    Did you find this post helpful? Yes | No

    Default Re: 18F series performance not so good?

    My code does various things - reads pixel data from eeprom and sends it to display module via paralel interface, to show meaningful data to user. It interacts with TCXO, ADCs, serial wired leds, mp3 module, GPS module and a lot of other I/O. My code does no complex math, except increasing value of some variables and doing HEX<>DEC conversion for RTC.

    Here's a small fragment from one of my 16F code. So moving to 18F, will deliver any speed increase for something like this?

    Code:
    ERASER: 'INITIAL DISPLAY SET TO ZERO
    low LED
    FOR Y=0 TO 15
    LOC=Y
    GOSUB LOCSET
    X=11
    GOSUB CODER
    NEXT 
    pause 30
    waiter: 'wait for keypress and display time
    if lock=0 then goto beginner
    pause 1000 'toggle led 
    toggle led 
    gosub gettime2
    gosub timedisp
    goto waiter 
    stop 'finish
    
    
    coder: 'decode into cd4543 bcd
    low strb
    PORTD.0=x.2
    PORTD.1=x.1
    PORTD.2=x.3
    PORTD.3=x.0
    high strb
    return
    
    
    LOCSET:' SET THE DIGIT LOCATION
    HIGH STRB
    PORTD.4=loc.0
    PORTD.5=loc.1
    PORTD.6=loc.2
    PORTD.7=loc.3
    LOW STRB
    'PAUSE 10
    RETURN
    
    
    gettime:
       I2CRead SDA, SCL, $D0, $00, [RTCSec, RTCMin, RTCHour, RTCDay, RTCDate, RTCMonth, RTCYear, RTCCtrl]
       t1=rtchour >> 4 
       t2=rtchour // 16 
       t3=rtcMin >> 4 
       T4=rtcMin // 16
       'Z1=(RTCmin >> 4)*10+RTCmin // 16 'decode seconds
       'Z2=(RTCHour >> 4)*10+RTCHour // 16 'decode hours
    hours=T1*10+T2
    minutes=T3*10+T4
      if DRO<>rtcmin then  'check for time changes, so display only is refreshed when time is changed
      cvlileba=1
      else
      cvlileba=0
      endif 
      DRO=rtcmin
         Return

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: 18F series performance not so good?

    I am sure it will.

    How much? I will not analyse your program for you as it is too much work to do.

    Ioannis

Similar Threads

  1. Replies: 7
    Last Post: - 21st September 2014, 01:59
  2. Moving on to 18F series.
    By Tina10 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 4th September 2012, 05:50
  3. 18F series challenges
    By Charlie in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd July 2011, 15:32
  4. 18f series chip locked up
    By glkosec in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th August 2009, 07:27
  5. OT - Firefox browser - faster performance
    By malc-c in forum Off Topic
    Replies: 2
    Last Post: - 14th August 2006, 10: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