The official mbed C/C SDK provides the software platform and libraries to build your applications.
Fork of mbed by
(01.May.2014) started sales! http://www.switch-science.com/catalog/1717/
(13.March.2014) updated to 0.5.0
This is a pin conversion PCB from mbed 1768/11U24 to arduino UNO.
- So if you have both mbed and arduino shields, I guess you would be happy with such a conversion board :)
Photos
- Board photo vvv
- Schematic photo vvv
- Functionality photo vvv
Latest eagle files
PCB >> /media/uploads/k4zuki/mbedshield050.brd
SCH >> /media/uploads/k4zuki/mbedshield050.sch
BIG changes from previous version
- Ethernet RJ45 connector is removed.
- http://mbed.org/components/Seeed-Ethernet-Shield-V20/ is the biggest hint to use Ethernet!
MostALL of components can be bought at Akizuki http://akizukidenshi.com/- But sorry, they do not send parts to abroad
- Pinout is changed!
arduino | 0.4.0 | 0.5.0 |
---|---|---|
D4 | p12 | p21 |
D5 | p11 | p22 |
MOSI_ | none | p11 |
MISO_ | none | p12 |
SCK_ | none | p13 |
This design has bug(s)
- I2C functional pin differs between 1768 and 11U24.
Fixed bugs here
- MiniUSB cable cannot be connected on mbed if you solder high-height electrolytic capacitor on C3.
- http://akizukidenshi.com/catalog/g/gP-05002/ is the solution to make this 100% AKIZUKI parts!
- the 6-pin ISP port is not inprimented in version 0.4.0
it will be fixed in later version 0.4.1/0.4.2/0.5.0This has beenfixed
I am doing some porting to use existing arduino shields but it may faster if you do it by yourself...
you can use arduino PinName "A0-A5,D0-D13" plus backside SPI port for easier porting.
To do this you have to edit PinName enum in
- "mbed/TARGET_LPC1768/PinNames.h" or
- "mbed/TARGET_LPC11U24/PinNames.h" as per your target mbed.
here is the actual list: This list includes define switch to switch pin assignment
part_of_PinNames.h
USBTX = P0_2, USBRX = P0_3, //from here mbeDshield mod D0=p27, D1=p28, D2=p14, D3=p13, #ifdef MBEDSHIELD_050 MOSI_=p11, MISO_=p12, SCK_=p13, D4=p21, D5=p22, #else D4=p12, D5=p11, #endif D6=p23, D7=p24, D8=p25, D9=p26, D10=p8, D11=p5, D12=p6, D13=p7, A0=p15, A1=p16, A2=p17, A3=p18, A4=p19, A5=p20, SDA=p9, SCL=p10, //mbeDshield mod ends here // Not connected NC = (int)0xFFFFFFFF
InterruptIn.h@11:1c1ebd0324fa, 2009-08-28 (annotated)
- Committer:
- rolf.meyer@arm.com
- Date:
- Fri Aug 28 12:10:11 2009 +0000
- Revision:
- 11:1c1ebd0324fa
- Child:
- 27:7110ebee3484
A shiny new version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rolf.meyer@arm.com | 11:1c1ebd0324fa | 1 | /* mbed Microcontroller Library - InterruptIn |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 2 | * Copyright (c) 2006-2009 ARM Limited. All rights reserved. |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 3 | * sford |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 4 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 5 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 6 | #ifndef MBED_INTERRUPTIN_H |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 7 | #define MBED_INTERRUPTIN_H |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 8 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 9 | #include "platform.h" |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 10 | #include "PinNames.h" |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 11 | #include "PeripheralNames.h" |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 12 | #include "Base.h" |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 13 | #include "FunctionPointer.h" |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 14 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 15 | namespace mbed { |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 16 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 17 | /* Class: InterruptIn |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 18 | * A digital interrupt input, used to call a function on a rising or falling edge |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 19 | * |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 20 | * Example: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 21 | * > // Flash an LED while waiting for events |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 22 | * > |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 23 | * > #include "mbed.h" |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 24 | * > |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 25 | * > InterruptIn event(p16); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 26 | * > DigitalOut led(LED1); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 27 | * > |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 28 | * > void trigger() { |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 29 | * > printf("triggered!\n"); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 30 | * > } |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 31 | * > |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 32 | * > int main() { |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 33 | * > event.rise(&trigger); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 34 | * > while(1) { |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 35 | * > led = !led; |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 36 | * > wait(0.25); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 37 | * > } |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 38 | * > } |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 39 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 40 | class InterruptIn : public Base { |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 41 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 42 | public: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 43 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 44 | /* Constructor: InterruptIn |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 45 | * Create an InterruptIn connected to the specified pin |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 46 | * |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 47 | * Variables: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 48 | * pin - InterruptIn pin to connect to |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 49 | * name - (optional) A string to identify the object |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 50 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 51 | InterruptIn(PinName pin, const char *name = NULL); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 52 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 53 | int read(); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 54 | #ifdef MBED_OPERATORS |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 55 | operator int(); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 56 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 57 | #endif |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 58 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 59 | /* Function: rise |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 60 | * Attach a function to call when a rising edge occurs on the input |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 61 | * |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 62 | * Variables: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 63 | * fptr - A pointer to a void function, or 0 to set as none |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 64 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 65 | void rise(void (*fptr)(void)); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 66 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 67 | /* Function: rise |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 68 | * Attach a member function to call when a rising edge occurs on the input |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 69 | * |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 70 | * Variables: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 71 | * tptr - pointer to the object to call the member function on |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 72 | * mptr - pointer to the member function to be called |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 73 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 74 | template<typename T> |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 75 | void rise(T* tptr, void (T::*mptr)(void)) { |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 76 | _rise.attach(tptr, mptr); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 77 | setup_interrupt(1, 1); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 78 | } |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 79 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 80 | /* Function: fall |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 81 | * Attach a function to call when a falling edge occurs on the input |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 82 | * |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 83 | * Variables: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 84 | * fptr - A pointer to a void function, or 0 to set as none |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 85 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 86 | void fall(void (*fptr)(void)); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 87 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 88 | /* Function: fall |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 89 | * Attach a member function to call when a falling edge occurs on the input |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 90 | * |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 91 | * Variables: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 92 | * tptr - pointer to the object to call the member function on |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 93 | * mptr - pointer to the member function to be called |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 94 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 95 | template<typename T> |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 96 | void fall(T* tptr, void (T::*mptr)(void)) { |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 97 | _fall.attach(tptr, mptr); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 98 | setup_interrupt(0, 1); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 99 | } |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 100 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 101 | /* Function: mode |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 102 | * Set the input pin mode |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 103 | * |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 104 | * Variables: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 105 | * mode - PullUp, PullDown, PullNone |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 106 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 107 | void mode(PinMode pull); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 108 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 109 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 110 | static void _irq(); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 111 | static InterruptIn *_irq_objects[48]; |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 112 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 113 | protected: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 114 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 115 | PinName _pin; |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 116 | FunctionPointer _rise; |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 117 | FunctionPointer _fall; |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 118 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 119 | void setup_interrupt(int rising, int enable); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 120 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 121 | }; |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 122 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 123 | } // namespace mbed |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 124 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 125 | #endif |