Results 1 to 5 of 5
  1. #1
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Oct 2016
    Location
    ישראל
    Posts
    9
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    MCP+ARDUINO UNO ?

    Hi Guys

    Im looking for B737 MCP code for my Arduino Uno

    I know there are for Mega but never found one for Uno

    Thanks!

  2. #2
    150+ Forum Groupie


    BushPilotWannabe's Avatar
    Join Date
    Jan 2014
    Location
    Alberta, Canada
    Posts
    176
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: MCP+ARDUINO UNO ?

    The AT328P based UNO is limited to 18 usable inputs. Do anything with the Serial library and you lose d0 and d1. Five rotary encoders will use ten of these. Keep trying. It can be done.


    Hugh
    ---CYXD ----- TWR --- GND ------ Closed
    ILS-- NDB -- 119.1 -- 121.9 ---- 11/2013

  3. #3
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Oct 2016
    Location
    ישראל
    Posts
    9
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: MCP+ARDUINO UNO ?

    tnx for your replay,

    im very new in the arduino thing so i cant realy program anything

    i will be happy if someone have code file for the MCP + arduino uno or can convert(?) Mega file code to Uno

    tnx!

  4. #4
    New Member
    Join Date
    Nov 2016
    Location
    Porto Alegre, RS - Brazil
    Posts
    3
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: MCP+ARDUINO UNO ?

    Hi.
    I make my mcp using a mega, because the uno dont have the necessary ports.
    The 737 mcp uses 6 rotary encoders (using 2 port for each), 2 switchs, 18 buttons, 15 leds and 6 displays (2 ports each). 59 ports total.
    I think that is possible only use a circuit to alow more entrance for each arduino port. But I do not know how to do it.

  5. #5
    150+ Forum Groupie


    BushPilotWannabe's Avatar
    Join Date
    Jan 2014
    Location
    Alberta, Canada
    Posts
    176
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: MCP+ARDUINO UNO ?

    MCP and the Arduino UNO

    My problem would be completely different. Find uses for the six unused pins.

    pin D0 Reserved for Serial Library
    pin D1 Reserved for Serial Library
    pin D2 Toggle switch #1
    pin D3 Toggle switch #2
    pin D4
    pin D5
    pin D6
    pin D7
    pin D8
    pin D9 PWM Piezo annunciator
    pin D10 SPI MOSI
    pin D11 Reserved for SPI Library
    pin D12 SPI SCK
    pin D13 SPI SS1
    pin D14 SPI SS2
    pin D15 SPI SS3
    pin D16 SPI SS4
    pin D17 (optional) clock output to 6 encoder backpack MCUs
    pin A4 Slow analog resistor ladder (pushbuttons)
    pin A5 Fast analog resistor ladder (encoders)

    SPI SS1 MAX7221 7-segment driver display #1 slave MAX7219 7 segment driver display #2

    SPI SS2 MAX7221 7-segment driver display #3 slave MAX7219 7 segment driver display #4

    SPI SS3 MAX7221 7-segment driver display #5 slave MAX7219 7 segment driver display #6

    SPI SS4 MAX7221 7-segment driver 15 LEDS

    Slow analog resistor ladder (pushbuttons) Simple resistor ladder. Number of resistors = (number of pushbuttons) + 1
    - Connect line side of the pushbuttons to individual nodes of the resistor ladder and load side to node between analog pin A4 and 100k pullup resistor. Calling the function to scan analog pin A4 every 100 milliseconds is sufficient for pushbuttons and saves much processor time.

    Fast analog resistor ladder (encoders) Simple resistor ladder. Number of resistors = (number of encoders x 2) + 1.
    - Connect Channels A and B to individual nodes on the resistor ladder and connect Common pin to node between analog pin A5 and 100k ohm pullup resistor.

    The encoders can be
    - full cycle rotary encoders
    - full, half, or quarter cycle rotary encoders with an attached ATTiny85 mcu clocked to output 2 bits if moved since last clocking
    - pulse switch

    Two problems using unclocked rotary encoders or pulse switches.
    - One device stuck in the closed position will shut down the resistor ladder. Build an audio warning into the sketch triggered by analog pin A5 held low for more than a set interval.
    - If the UNO is busy when the operator starts turning a rotary encoder, analog pin A5 may be connected to the trailing Channel not the leading Channel producing a movement in the wrong direction. This is usually not seen when moving one or two degrees, but is most common with greater number of operations turning 120 degrees to a new course. Few operators can tell that the encoder may have turned the encoder 21 clicks and only produced 19 degrees of change.
    Last edited by BushPilotWannabe; 02-03-2017 at 01:04 PM. Reason: add 100 millisecond period to slow resistor ladder
    ---CYXD ----- TWR --- GND ------ Closed
    ILS-- NDB -- 119.1 -- 121.9 ---- 11/2013