Midi input, using hserin?


Results 1 to 17 of 17

Threaded View

  1. #2
    Kees Reedijk's Avatar
    Kees Reedijk Guest


    Did you find this post helpful? Yes | No

    Default MIDI in

    Here's an example using serin2, you have to use a 20MHz crystal:
    It reads in MIDI data and sends it out to a serial port, worked fine for me.

    @ device pic16F628A, pwrt_on, mclr_on, protect_off, wdt_on, HS_OSC

    INCLUDE "modedefs.bas"

    DEFINE OSC 20

    CMCON = 7 ' PortA = digital I/O

    PORTA = %00000001
    TRISA = %00000000
    PORTB = %00000000
    TRISB = %00000000

    test1 VAR BYTE
    test2 VAR BYTE
    mdata VAR BYTE

    loop:
    SerIn2 PORTA.0,12,[test1,test2,mdata]
    SerOut PORTB.7,N9600,[" midi : ",#test1," ",#test2," ",#mdata,10,13]
    GoTo loop

    end
    Last edited by Kees Reedijk; - 13th July 2006 at 22:48.

Similar Threads

  1. Sony LanC Program
    By l_gaminde in forum Code Examples
    Replies: 2
    Last Post: - 25th September 2009, 18:51
  2. How to HSERIN and MIDI code?
    By francolok in forum Serial
    Replies: 1
    Last Post: - 18th December 2008, 16:59
  3. Midi, Interrupts and Pic better than SX28?
    By Lajko in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th September 2008, 00:26
  4. Timing input pulses and re-outputting them
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2007, 01:50
  5. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 22:19

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