Translation Problem


Results 1 to 9 of 9

Threaded View

  1. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    But as skimask might point out to me on page 80 of the little green book, at the top it really is ok.
    I might....but I won't....'cause I know from experience that you're all over that....


    A shorter version:
    Code:
    trisa = 255 : trisb = 240 : p var byte
    start:
    if portb.4 = 0 then goto trigger
    goto start
    
    trigger:
    pause 500 : if portb.5 then goto send
    goto start
    
    send:
    if porta.4 = 1 then goto eleven
    portb = porta : goto start
    
    eleven:
    if porta.0 = 0 then goto ten
    portb = 11 : goto start
    
    ten:
    portb = 10 : goto start
    end

    But I wonder if the original poster didn't mean to use this:
    Code:
    trisa = $FF : trisb = $F0 : p var byte
    start:
    if portb.4 = %0 then goto trigger
    goto start
    
    trigger:
    pause 500 : if portb.5 = %1 then goto send
    goto start
    
    send:
    if porta.4 = %1 then goto eleven
    portb = porta : goto start
    
    eleven:
    if porta.0 = %0 then goto ten
    portb = %11 : goto start
    
    ten:
    portb = %10 : goto start
    end
    Notice the 'special' characters added...
    Last edited by skimask; - 23rd April 2007 at 17:27.

Similar Threads

  1. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 09:12
  2. PicBasic Pro Math Problem??
    By Glen65 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th March 2006, 05:36
  3. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 23:59
  4. weird 12F629/675 problem
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 7th October 2004, 02:08
  5. PORTA.PinNo = 1 ' problem
    By frank small in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th May 2004, 15:30

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