USART with INTERRUPTS


Results 1 to 13 of 13

Threaded View

  1. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    So, all you're really trying to do right now is get a 'loop back' to work?

    @ device hs_OSC, wdt_on, pwrt_on, protect_off
    define osc 20
    Include "modedefs.bas"
    trisc.6=0:trisc.7=1:trisd.0=0:serialdata var byte : counter var word : counter2 var word
    main:
    counter=counter+1 : portd.0 = counter.1 'toggle led on portd.0 each time thru the loop
    serialdata=0:serin portc.7, n9600, serialdata:if serialdata=0 then goto main 'get serial data, if none, restart loop
    counter2 = counter2 + 1:serout portc.6, n9600, [ dec counter2 , ":" , serialdata , 13 , 10 ]:goto main
    end
    Last edited by skimask; - 17th April 2007 at 18:08.

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. Clock using Instant Interrupts
    By PICpocket in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th February 2009, 21:43
  3. DT's Instant Interrupts trouble
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th November 2008, 20:48
  4. help: TMR0 interrupts disabling PORTAchange interrupts???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th August 2008, 15:10
  5. problem with USART
    By leemin in forum Serial
    Replies: 4
    Last Post: - 11th December 2006, 17:56

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