Problem runing my code


Closed Thread
Results 1 to 34 of 34

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Thumbs down Processor unability ....

    i want both programes to run apart from each other
    Hi,

    With Pics ... You CAN'T do two things at the same time ( say totally independant things - excluding Peripheral use )

    a Pic does ONE THING AT A TIME ... " Multitasking " just is doing a little part of a task, then a little part of another task, then ...... a little part of the first task, then ....

    very quickly.

    thats ALL !!!

    For your LED Example ... you'd have to use a Pair of "555" as EXTERNAL peripherals, ( HPWM modules are too fast ) to drive your leds .

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi,

    With Pics ... You CAN'T do two things at the same time ( say totally independant things - excluding Peripheral use )

    a Pic does ONE THING AT A TIME ... " Multitasking " just is doing a little part of a task, then a little part of another task, then ...... a little part of the first task, then ....

    very quickly.

    thats ALL !!!

    For your LED Example ... you'd have to use a Pair of "555" as EXTERNAL peripherals, ( HPWM modules are too fast ) to drive your leds .

    Alain
    o right thank u Acetronics for reply.check ur pm . it just confused me this 7 sgment it need the routine in main label each 1 ms, so if i put anythings has delays or like serin it cuz the 7seg delay and blinking slow thats im thinkin to define it like lcd or something to kepp the shift out runing each 1 ms .and do my programe works and has delayes,,,,,,,,,
    Last edited by Mus.me; - 23rd November 2009 at 13:44.

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi,

    BUT ...

    I think you could " re write " your project ... showing clearly what you want to do !!!

    refresing your full display @ 200 Hz is not compulsory . 50/60 Hz is a classical value ... that leaves some time in between to do little other tasks ... while a digit is lit ...

    You should Google around For the numerous ( ! ) alarm clock projects on the web ...

    Difficult to help you not knowing what you want to do ....

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    i think none understands my quetion.i want to run like this code ..
    i want both programes to run apart from each other its just example so i can write my programe like this plz help
    You can obtain the two leds flashing at a different interval with a couple of variable:


    Code:
    Dled     Var Byte
    Dled1   var Word
    
    main:   '  led will blink @ 0,1 sec; led1 will be on for 2 secs off for 0,2 sesc
    Pause 1
    
    Dled = Dled + 1
    Dled1 = Dled1 + 1
    
    If Dled =>100 then
    Toggle led
    Dled = 0
    endif
    
    If Dled1 = 1 then high led1
    If Dled1 = 2000 low led1
    If Dled1 =>2200 then Dled1 = 0
    
    
    goto main
    Al.
    All progress began with an idea

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. 16F883 Code Verify Problem
    By munromh in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th February 2009, 11:47
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  4. problem with my code
    By civicgundam in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 3rd February 2008, 01:52
  5. Code problem
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 20th May 2006, 04:43

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