Problems with 12F675


Results 1 to 40 of 67

Threaded View

  1. #40
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default

    My previous posts are wrong !
    This is what work good for me ( about 10 seconds) :
    Code:
    btn1:                   			'actionare buton up
      
      if but1=1 and rel2=0  then
               high rel1
               TMR1ON = 1
               pause 20
                                
               while but1=1
               t1Count=T1Count+1
               call check
               wend
               IF LongPress THEN Stop_UP
               T1Count = 0        
               pause 20
                                             
               while but1 = 0 and but2 = 0
               t1Count=T1Count+1
               call check
               if rel1=0 then
                  GOTO Btn1PressDone
               endif
               wend
        Stop_UP:
    idem for btn2
    and :
    Code:
              if vt > 270 o then      
                          u=u+1
                          if u > 5 or T1Count > 100 then
      	              gpio.0=0
                          gpio.5=0				
                          endif
                  pause 50
                  goto check            
              else
                  u=0
    It's correct what I do ? Thanks !
    Last edited by fratello; - 23rd April 2010 at 18:00.

Similar Threads

  1. 12F683 vs 12F675.
    By sccoupe in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th July 2009, 04:58
  2. LANC code 12F675
    By MikeDD in forum General
    Replies: 4
    Last Post: - 9th May 2008, 05:44
  3. 12F675 cant serout to PC
    By ruijc in forum General
    Replies: 9
    Last Post: - 3rd December 2007, 00:11
  4. USART problems
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 47
    Last Post: - 6th March 2005, 21:45
  5. Serial LCD on 12F675
    By anj in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 31st March 2004, 23:11

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