hardware counting while software runs


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Yeap, I forgot to say that the code above is for 16F877-20Mhz.

    Also,

    Quote Originally Posted by mister_e
    @Sayzer

    @ DEVICE HS_OSC,WDT_ON,PROTECT_OFF,CPD_ON,PWRT_ON,BOD_ON
    I know what you mean Steve! I will never forget.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

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


    Did you find this post helpful? Yes | No

    Default HMMMMMMMMmmmmmmm

    Thanks,
    I will take this code home and chew on it a while . . . . I am not manipulating data in an lcd, rather I am using it to control hardware.something like so:

    x var byte

    main:
    if porta.0 !=0 then
    pause50
    DoSomthing
    else
    endif
    goto main


    DoSomething:
    for x = 50 to 0 step - 1
    goto encoder
    portB.5 low
    next x
    return

    encoder:
    Portb.5 high ' to power up encoder
    some code here to count encoder subtracting code from var X
    return

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S.
    .....


    main:
    if porta.0 !=0 then
    pause50
    DoSomthing 'is a goto not a gosub
    else
    endif
    goto main


    DoSomething:
    for x = 50 to 0 step - 1
    goto encoder 'another one here
    portB.5 low
    next x
    return

    encoder:
    Portb.5 high ' to power up encoder
    some code here to count encoder subtracting code from var X
    return

    I guess this was a quick example.
    Check "goto" !
    Last edited by sayzer; - 2nd October 2006 at 04:29.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

Similar Threads

  1. Benefits of hardware usart over software?
    By sccoupe in forum Serial
    Replies: 2
    Last Post: - 19th March 2009, 02:16
  2. Hardware or Software
    By bmagistro in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th March 2009, 00:22
  3. Software Stack
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th December 2007, 11:04
  4. IR software & hardware basics
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 6th May 2007, 11:05
  5. Programming software for PicAll Hardware
    By bcd in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th July 2006, 09:15

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