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
DigitalInOut.h@43:e2ed12d17f06, 2012-10-26 (annotated)
- Committer:
- emilmont
- Date:
- Fri Oct 26 17:40:46 2012 +0100
- Revision:
- 43:e2ed12d17f06
- Parent:
- 27:7110ebee3484
- Child:
- 44:24d45a770a51
Update documentation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rolf.meyer@arm.com | 11:1c1ebd0324fa | 1 | /* mbed Microcontroller Library - DigitalInOut |
emilmont | 27:7110ebee3484 | 2 | * Copyright (c) 2006-2011 ARM Limited. All rights reserved. |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 3 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 4 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 5 | #ifndef MBED_DIGITALINOUT_H |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 6 | #define MBED_DIGITALINOUT_H |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 7 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 8 | #include "platform.h" |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 9 | #include "PinNames.h" |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 10 | #include "PeripheralNames.h" |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 11 | #include "Base.h" |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 12 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 13 | namespace mbed { |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 14 | |
emilmont | 43:e2ed12d17f06 | 15 | /** A digital input/output, used for setting or reading a bi-directional pin |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 16 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 17 | class DigitalInOut : public Base { |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 18 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 19 | public: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 20 | |
emilmont | 43:e2ed12d17f06 | 21 | /** Create a DigitalInOut connected to the specified pin |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 22 | * |
emilmont | 43:e2ed12d17f06 | 23 | * @param pin DigitalInOut pin to connect to |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 24 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 25 | DigitalInOut(PinName pin, const char* name = NULL); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 26 | |
emilmont | 43:e2ed12d17f06 | 27 | /** Set the output, specified as 0 or 1 (int) |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 28 | * |
emilmont | 43:e2ed12d17f06 | 29 | * @param value An integer specifying the pin output value, |
emilmont | 43:e2ed12d17f06 | 30 | * 0 for logical 0, 1 (or any other non-zero value) for logical 1 |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 31 | */ |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 32 | void write(int value) { |
emilmont | 27:7110ebee3484 | 33 | #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) |
emilmont | 27:7110ebee3484 | 34 | |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 35 | if(value) { |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 36 | _gpio->FIOSET = _mask; |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 37 | } else { |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 38 | _gpio->FIOCLR = _mask; |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 39 | } |
emilmont | 27:7110ebee3484 | 40 | |
emilmont | 27:7110ebee3484 | 41 | #elif defined(TARGET_LPC11U24) |
emilmont | 27:7110ebee3484 | 42 | |
emilmont | 27:7110ebee3484 | 43 | if(value) { |
emilmont | 27:7110ebee3484 | 44 | LPC_GPIO->SET[_index] = _mask; |
emilmont | 27:7110ebee3484 | 45 | } else { |
emilmont | 27:7110ebee3484 | 46 | LPC_GPIO->CLR[_index] = _mask; |
emilmont | 27:7110ebee3484 | 47 | } |
emilmont | 27:7110ebee3484 | 48 | #endif |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 49 | } |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 50 | |
emilmont | 43:e2ed12d17f06 | 51 | /** Return the output setting, represented as 0 or 1 (int) |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 52 | * |
emilmont | 43:e2ed12d17f06 | 53 | * @returns |
emilmont | 43:e2ed12d17f06 | 54 | * an integer representing the output setting of the pin if it is an output, |
emilmont | 43:e2ed12d17f06 | 55 | * or read the input if set as an input |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 56 | */ |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 57 | int read() { |
emilmont | 27:7110ebee3484 | 58 | #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) |
emilmont | 27:7110ebee3484 | 59 | |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 60 | return ((_gpio->FIOPIN & _mask) ? 1 : 0); |
emilmont | 27:7110ebee3484 | 61 | #elif defined(TARGET_LPC11U24) |
emilmont | 27:7110ebee3484 | 62 | return ((LPC_GPIO->PIN[_index] & _mask) ? 1 : 0); |
emilmont | 27:7110ebee3484 | 63 | #endif |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 64 | } |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 65 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 66 | |
emilmont | 43:e2ed12d17f06 | 67 | /** Set as an output |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 68 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 69 | void output(); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 70 | |
emilmont | 43:e2ed12d17f06 | 71 | /** Set as an input |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 72 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 73 | void input(); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 74 | |
emilmont | 43:e2ed12d17f06 | 75 | /** Set the input pin mode |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 76 | * |
emilmont | 43:e2ed12d17f06 | 77 | * @param mode PullUp, PullDown, PullNone, OpenDrain |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 78 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 79 | void mode(PinMode pull); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 80 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 81 | #ifdef MBED_OPERATORS |
emilmont | 43:e2ed12d17f06 | 82 | /** A shorthand for write() |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 83 | */ |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 84 | DigitalInOut& operator= (int value) { |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 85 | write(value); |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 86 | return *this; |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 87 | } |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 88 | |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 89 | DigitalInOut& operator= (DigitalInOut& rhs) { |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 90 | write(rhs.read()); |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 91 | return *this; |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 92 | } |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 93 | |
emilmont | 43:e2ed12d17f06 | 94 | /** A shorthand for read() |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 95 | */ |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 96 | operator int() { |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 97 | return read(); |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 98 | } |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 99 | #endif |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 100 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 101 | #ifdef MBED_RPC |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 102 | virtual const struct rpc_method *get_rpc_methods(); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 103 | static struct rpc_class *get_rpc_class(); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 104 | #endif |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 105 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 106 | protected: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 107 | |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 108 | PinName _pin; |
emilmont | 27:7110ebee3484 | 109 | |
emilmont | 27:7110ebee3484 | 110 | #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 111 | LPC_GPIO_TypeDef *_gpio; |
emilmont | 27:7110ebee3484 | 112 | #elif defined(TARGET_LPC11U24) |
emilmont | 27:7110ebee3484 | 113 | int _index; |
emilmont | 27:7110ebee3484 | 114 | #endif |
emilmont | 27:7110ebee3484 | 115 | |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 116 | uint32_t _mask; |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 117 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 118 | }; |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 119 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 120 | } // namespace mbed |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 121 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 122 | #endif |