Bitwise not working


Results 1 to 15 of 15

Threaded View

  1. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Code:
    DEFINE OSC 20
    DEFINE LOADER_USED 1
    RCSTA = $90   ' Enable serial port & continuous receive
    TXSTA = $20   ' Enable transmit, BRGH = 0
    SPBRG = 64    ' 19200 Baud @ 0.16%
    SPBRGH = 0
    BAUDCON.3 = 1 ' Enable 16 bit baudrate generator
    
    PORTB=0
    TRISB=%11110000
    i     var byte
    Temp  var byte
    
    Hserout ["***** Waiting PORTB.7 = 0 *****",13,10]
    While PORTB.7=1 : wend
    
    hserout ["------------------------Start",13,10]
    for i = 0 to 15
      PORTB=i
      Temp=PORTB
      hserout ["PORTB=",bin8 temp,13,10]
      next
    hserout ["------------------------Stop",13,10]          
    
    Spin: goto Spin
    if i hold PORTB.7=0

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1137&stc=1&d=116117525 3">
    Attached Images Attached Images  
    Last edited by mister_e; - 18th October 2006 at 13:41.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. 16F877A with 20MHz XTAL not working?
    By ustredna in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 19th August 2011, 15:04
  2. 2x16 lcd not working with pic16f72
    By vu2iia in forum Schematics
    Replies: 4
    Last Post: - 16th February 2011, 14:59
  3. Blink.Bas on 18f45k20 Newbie seeks working example.
    By DiscoEd in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th December 2009, 03:36
  4. Pic 16 F628A not working
    By turkuaz in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 17th March 2009, 12:26
  5. Hserin not working...
    By robert0 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd August 2005, 12:25

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