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
DigitalOut.h@27:7110ebee3484, 2011-11-29 (annotated)
- Committer:
- emilmont
- Date:
- Tue Nov 29 14:59:27 2011 +0000
- Revision:
- 27:7110ebee3484
- Parent:
- 18:b3c9f16cbb96
- Child:
- 43:e2ed12d17f06
New Libraries 11.11
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
simon.ford@mbed.co.uk | 0:82220227f4fa | 1 | /* mbed Microcontroller Library - DigitalOut |
emilmont | 27:7110ebee3484 | 2 | * Copyright (c) 2006-2011 ARM Limited. All rights reserved. |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 3 | */ |
simon.ford@mbed.co.uk | 0:82220227f4fa | 4 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 5 | #ifndef MBED_DIGITALOUT_H |
simon.ford@mbed.co.uk | 0:82220227f4fa | 6 | #define MBED_DIGITALOUT_H |
simon.ford@mbed.co.uk | 0:82220227f4fa | 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" |
simon.ford@mbed.co.uk | 0:82220227f4fa | 11 | #include "Base.h" |
simon.ford@mbed.co.uk | 0:82220227f4fa | 12 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 13 | namespace mbed { |
simon.ford@mbed.co.uk | 0:82220227f4fa | 14 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 15 | /* Class: DigitalOut |
simon.ford@mbed.co.uk | 0:82220227f4fa | 16 | * A digital output, used for setting the state of a pin |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 17 | * |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 18 | * Example: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 19 | * > // Toggle a LED |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 20 | * > #include "mbed.h" |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 21 | * > |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 22 | * > DigitalOut led(LED1); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 23 | * > |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 24 | * > int main() { |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 25 | * > while(1) { |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 26 | * > led = !led; |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 27 | * > wait(0.2); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 28 | * > } |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 29 | * > } |
simon.ford@mbed.co.uk | 0:82220227f4fa | 30 | */ |
simon.ford@mbed.co.uk | 0:82220227f4fa | 31 | class DigitalOut : public Base { |
simon.ford@mbed.co.uk | 0:82220227f4fa | 32 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 33 | public: |
simon.ford@mbed.co.uk | 0:82220227f4fa | 34 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 35 | /* Constructor: DigitalOut |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 36 | * Create a DigitalOut connected to the specified pin |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 37 | * |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 38 | * Variables: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 39 | * pin - DigitalOut pin to connect to |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 40 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 41 | DigitalOut(PinName pin, const char* name = NULL); |
simon.ford@mbed.co.uk | 0:82220227f4fa | 42 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 43 | /* Function: write |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 44 | * Set the output, specified as 0 or 1 (int) |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 45 | * |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 46 | * Variables: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 47 | * value - An integer specifying the pin output value, |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 48 | * 0 for logical 0 and 1 (or any other non-zero value) for logical 1 |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 49 | */ |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 50 | void write(int value) { |
emilmont | 27:7110ebee3484 | 51 | |
emilmont | 27:7110ebee3484 | 52 | #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) |
emilmont | 27:7110ebee3484 | 53 | |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 54 | if(value) { |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 55 | _gpio->FIOSET = _mask; |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 56 | } else { |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 57 | _gpio->FIOCLR = _mask; |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 58 | } |
emilmont | 27:7110ebee3484 | 59 | |
emilmont | 27:7110ebee3484 | 60 | #elif defined(TARGET_LPC11U24) |
emilmont | 27:7110ebee3484 | 61 | |
emilmont | 27:7110ebee3484 | 62 | if(value) { |
emilmont | 27:7110ebee3484 | 63 | LPC_GPIO->SET[_index] = _mask; |
emilmont | 27:7110ebee3484 | 64 | } else { |
emilmont | 27:7110ebee3484 | 65 | LPC_GPIO->CLR[_index] = _mask; |
emilmont | 27:7110ebee3484 | 66 | } |
emilmont | 27:7110ebee3484 | 67 | #endif |
emilmont | 27:7110ebee3484 | 68 | |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 69 | } |
simon.ford@mbed.co.uk | 0:82220227f4fa | 70 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 71 | /* Function: read |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 72 | * Return the output setting, represented as 0 or 1 (int) |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 73 | * |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 74 | * Variables: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 75 | * returns - An integer representing the output setting of the pin, |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 76 | * 0 for logical 0 and 1 for logical 1 |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 77 | */ |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 78 | int read() { |
emilmont | 27:7110ebee3484 | 79 | #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 80 | return ((_gpio->FIOPIN & _mask) ? 1 : 0); |
emilmont | 27:7110ebee3484 | 81 | #elif defined(TARGET_LPC11U24) |
emilmont | 27:7110ebee3484 | 82 | return ((LPC_GPIO->PIN[_index] & _mask) ? 1 : 0); |
emilmont | 27:7110ebee3484 | 83 | #endif |
emilmont | 27:7110ebee3484 | 84 | |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 85 | } |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 86 | |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 87 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 88 | #ifdef MBED_OPERATORS |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 89 | /* Function: operator= |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 90 | * A shorthand for <write> |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 91 | */ |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 92 | DigitalOut& operator= (int value) { |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 93 | write(value); |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 94 | return *this; |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 95 | } |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 96 | |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 97 | DigitalOut& operator= (DigitalOut& rhs) { |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 98 | write(rhs.read()); |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 99 | return *this; |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 100 | } |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 101 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 102 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 103 | /* Function: operator int() |
simon.ford@mbed.co.uk | 0:82220227f4fa | 104 | * A shorthand for <read> |
simon.ford@mbed.co.uk | 0:82220227f4fa | 105 | */ |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 106 | operator int() { |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 107 | return read(); |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 108 | } |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 109 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 110 | #endif |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 111 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 112 | #ifdef MBED_RPC |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 113 | virtual const struct rpc_method *get_rpc_methods(); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 114 | static struct rpc_class *get_rpc_class(); |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 115 | #endif |
simon.ford@mbed.co.uk | 0:82220227f4fa | 116 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 117 | protected: |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 118 | |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 119 | PinName _pin; |
emilmont | 27:7110ebee3484 | 120 | |
emilmont | 27:7110ebee3484 | 121 | #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 122 | LPC_GPIO_TypeDef *_gpio; |
emilmont | 27:7110ebee3484 | 123 | #elif defined(TARGET_LPC11U24) |
emilmont | 27:7110ebee3484 | 124 | int _index; |
emilmont | 27:7110ebee3484 | 125 | #endif |
emilmont | 27:7110ebee3484 | 126 | |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 127 | uint32_t _mask; |
simon.ford@mbed.co.uk | 18:b3c9f16cbb96 | 128 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 129 | |
simon.ford@mbed.co.uk | 0:82220227f4fa | 130 | }; |
simon.ford@mbed.co.uk | 0:82220227f4fa | 131 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 132 | } // namespace mbed |
simon.ford@mbed.co.uk | 0:82220227f4fa | 133 | |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 134 | #endif |