Stuck on porting code to 18F4520


Results 1 to 40 of 43

Threaded View

  1. #3
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Stuck on porting code to 18F4520

    Henrik, thanks for the suggestion.

    I'm terrible at understanding datasheets, so can you confirm if I've understood this ?

    The Timer0 module is controlled by the T0CON register,bit 0-2 sets the pre-scaler, so to get the pre-scaler value 256 required these bits are set to 1. Looking at the the other options would setting this register to 1110111 be correct to

    [1]enable timer0, [1]set to 8bit timer, [1]use the external xtal, [0]assign to use prescaller and use the output, [111]set prescaler value to 256

    Regards

    Malcolm


    EDIT - I've tried DEFINE OSC 20 and all I get on the LCD display are two lines of solid blocks (which normally happens when the pic doesn't run) - or is it because there is no time for the PIC to action the LCDout instruction because there is no time between the timer tripping over ?
    Last edited by Scampy; - 28th October 2013 at 20:10.

Similar Threads

  1. Porting code to new PIC
    By malc-c in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 31st December 2010, 23:20
  2. Kind of stuck
    By gti_uk in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 31st May 2009, 20:45
  3. Getting Stuck in loop
    By Frozen001 in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 19th November 2008, 15:46
  4. Any idea's on porting this to PBP?
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 10th October 2008, 19:21
  5. Replies: 1
    Last Post: - 8th May 2008, 00:52

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