The official mbed C/C SDK provides the software platform and libraries to build your applications.

Dependents:   SeeedTouchLCD

Fork of mbed by mbed official

(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 /media/uploads/k4zuki/mbedshield050.brd.png
  • Schematic photo vvv /media/uploads/k4zuki/mbedshield050.sch.png
  • Functionality photo vvv /media/uploads/k4zuki/mbedshieldfunc.jpg

Latest eagle files

PCB >> /media/uploads/k4zuki/mbedshield050.brd
SCH >> /media/uploads/k4zuki/mbedshield050.sch

BIG changes from previous version

  1. Ethernet RJ45 connector is removed.
    1. http://mbed.org/components/Seeed-Ethernet-Shield-V20/ is the biggest hint to use Ethernet!
  2. Most ALL of components can be bought at Akizuki http://akizukidenshi.com/
    1. But sorry, they do not send parts to abroad
  3. Pinout is changed!
arduino0.4.00.5.0
D4p12p21
D5p11p22
MOSI_nonep11
MISO_nonep12
SCK_nonep13

This design has bug(s)

  1. I2C functional pin differs between 1768 and 11U24.

Fixed bugs here

  1. MiniUSB cable cannot be connected on mbed if you solder high-height electrolytic capacitor on C3.
    1. http://akizukidenshi.com/catalog/g/gP-05002/ is the solution to make this 100% AKIZUKI parts!
  2. the 6-pin ISP port is not inprimented in version 0.4.0
    1. it will be fixed in later version 0.4.1/0.4.2/0.5.0 This 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
Committer:
emilmont
Date:
Fri Oct 26 17:40:46 2012 +0100
Revision:
43:e2ed12d17f06
Parent:
27:7110ebee3484
Update documentation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
simon.ford@mbed.co.uk 0:82220227f4fa 1 /* mbed Microcontroller Library - Base
simon.ford@mbed.co.uk 4:5d1359a283bc 2 * Copyright (c) 2006-2008 ARM Limited. All rights reserved.
simon.ford@mbed.co.uk 0:82220227f4fa 3 */
simon.ford@mbed.co.uk 4:5d1359a283bc 4
simon.ford@mbed.co.uk 0:82220227f4fa 5 #ifndef MBED_BASE_H
simon.ford@mbed.co.uk 0:82220227f4fa 6 #define MBED_BASE_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 4:5d1359a283bc 11 #include <cstdlib>
simon.ford@mbed.co.uk 8:00a04e5cd407 12 #include "DirHandle.h"
simon.ford@mbed.co.uk 0:82220227f4fa 13
simon.ford@mbed.co.uk 0:82220227f4fa 14 namespace mbed {
simon.ford@mbed.co.uk 0:82220227f4fa 15
rolf.meyer@arm.com 11:1c1ebd0324fa 16 #ifdef MBED_RPC
simon.ford@mbed.co.uk 5:62573be585e9 17 struct rpc_function {
simon.ford@mbed.co.uk 5:62573be585e9 18 const char *name;
simon.ford@mbed.co.uk 5:62573be585e9 19 void (*caller)(const char*, char*);
simon.ford@mbed.co.uk 5:62573be585e9 20 };
simon.ford@mbed.co.uk 5:62573be585e9 21
simon.ford@mbed.co.uk 5:62573be585e9 22 struct rpc_class {
simon.ford@mbed.co.uk 5:62573be585e9 23 const char *name;
simon.ford@mbed.co.uk 5:62573be585e9 24 const rpc_function *static_functions;
simon.ford@mbed.co.uk 5:62573be585e9 25 struct rpc_class *next;
simon.ford@mbed.co.uk 5:62573be585e9 26 };
rolf.meyer@arm.com 11:1c1ebd0324fa 27 #endif
simon.ford@mbed.co.uk 5:62573be585e9 28
emilmont 43:e2ed12d17f06 29 /** The base class for most things
simon.ford@mbed.co.uk 4:5d1359a283bc 30 */
simon.ford@mbed.co.uk 0:82220227f4fa 31 class Base {
simon.ford@mbed.co.uk 0:82220227f4fa 32
simon.ford@mbed.co.uk 0:82220227f4fa 33 public:
simon.ford@mbed.co.uk 4:5d1359a283bc 34
simon.ford@mbed.co.uk 4:5d1359a283bc 35 Base(const char *name = NULL);
simon.ford@mbed.co.uk 0:82220227f4fa 36
simon.ford@mbed.co.uk 4:5d1359a283bc 37 virtual ~Base();
simon.ford@mbed.co.uk 4:5d1359a283bc 38
emilmont 43:e2ed12d17f06 39 /** Registers this object with the given name, so that it can be
simon.ford@mbed.co.uk 4:5d1359a283bc 40 * looked up with lookup. If this object has already been
simon.ford@mbed.co.uk 4:5d1359a283bc 41 * registered, then this just changes the name.
simon.ford@mbed.co.uk 4:5d1359a283bc 42 *
emilmont 43:e2ed12d17f06 43 * @param name The name to give the object. If NULL we do nothing.
simon.ford@mbed.co.uk 4:5d1359a283bc 44 */
simon.ford@mbed.co.uk 4:5d1359a283bc 45 void register_object(const char *name);
simon.ford@mbed.co.uk 4:5d1359a283bc 46
emilmont 43:e2ed12d17f06 47 /** Returns the name of the object
emilmont 43:e2ed12d17f06 48 *
emilmont 43:e2ed12d17f06 49 * @returns
emilmont 43:e2ed12d17f06 50 * The name of the object, or NULL if it has no name.
simon.ford@mbed.co.uk 4:5d1359a283bc 51 */
simon.ford@mbed.co.uk 4:5d1359a283bc 52 const char *name();
simon.ford@mbed.co.uk 4:5d1359a283bc 53
rolf.meyer@arm.com 11:1c1ebd0324fa 54 #ifdef MBED_RPC
rolf.meyer@arm.com 11:1c1ebd0324fa 55
emilmont 43:e2ed12d17f06 56 /** Call the given method with the given arguments, and write the
simon.ford@mbed.co.uk 4:5d1359a283bc 57 * result into the string pointed to by result. The default
simon.ford@mbed.co.uk 4:5d1359a283bc 58 * implementation calls rpc_methods to determine the supported
simon.ford@mbed.co.uk 4:5d1359a283bc 59 * methods.
simon.ford@mbed.co.uk 4:5d1359a283bc 60 *
emilmont 43:e2ed12d17f06 61 * @param method The name of the method to call.
emilmont 43:e2ed12d17f06 62 * @param arguments A list of arguments separated by spaces.
emilmont 43:e2ed12d17f06 63 * @param result A pointer to a string to write the result into. May be NULL, in which case nothing is written.
rolf.meyer@arm.com 11:1c1ebd0324fa 64 *
emilmont 43:e2ed12d17f06 65 * @returns
emilmont 43:e2ed12d17f06 66 * true if method corresponds to a valid rpc method, or
emilmont 43:e2ed12d17f06 67 * false otherwise.
simon.ford@mbed.co.uk 4:5d1359a283bc 68 */
emilmont 43:e2ed12d17f06 69 virtual bool rpc(const char *method, const char *arguments, char *result);
simon.ford@mbed.co.uk 0:82220227f4fa 70
emilmont 43:e2ed12d17f06 71 /** Returns a pointer to an array describing the rpc methods
simon.ford@mbed.co.uk 5:62573be585e9 72 * supported by this object, terminated by either
simon.ford@mbed.co.uk 5:62573be585e9 73 * RPC_METHOD_END or RPC_METHOD_SUPER(Superclass).
simon.ford@mbed.co.uk 4:5d1359a283bc 74 *
simon.ford@mbed.co.uk 4:5d1359a283bc 75 * Example
emilmont 43:e2ed12d17f06 76 * @code
emilmont 43:e2ed12d17f06 77 * class Example : public Base {
emilmont 43:e2ed12d17f06 78 * int foo(int a, int b) { return a + b; }
emilmont 43:e2ed12d17f06 79 * virtual const struct rpc_method *get_rpc_methods() {
emilmont 43:e2ed12d17f06 80 * static const rpc_method rpc_methods[] = {
emilmont 43:e2ed12d17f06 81 * { "foo", generic_caller<int, Example, int, int, &Example::foo> },
emilmont 43:e2ed12d17f06 82 * RPC_METHOD_SUPER(Base)
emilmont 43:e2ed12d17f06 83 * };
emilmont 43:e2ed12d17f06 84 * return rpc_methods;
emilmont 43:e2ed12d17f06 85 * }
emilmont 43:e2ed12d17f06 86 * };
emilmont 43:e2ed12d17f06 87 * @endcode
simon.ford@mbed.co.uk 4:5d1359a283bc 88 */
simon.ford@mbed.co.uk 5:62573be585e9 89 virtual const struct rpc_method *get_rpc_methods();
simon.ford@mbed.co.uk 5:62573be585e9 90
emilmont 43:e2ed12d17f06 91 /** Use the lookup function to lookup an object and, if
simon.ford@mbed.co.uk 4:5d1359a283bc 92 * successful, call its rpc method
simon.ford@mbed.co.uk 4:5d1359a283bc 93 *
emilmont 43:e2ed12d17f06 94 * @returns
emilmont 43:e2ed12d17f06 95 * false if name does not correspond to an object,
simon.ford@mbed.co.uk 4:5d1359a283bc 96 * otherwise the return value of the call to the object's rpc
simon.ford@mbed.co.uk 4:5d1359a283bc 97 * method.
simon.ford@mbed.co.uk 4:5d1359a283bc 98 */
simon.ford@mbed.co.uk 4:5d1359a283bc 99 static bool rpc(const char *name, const char *method, const char *arguments, char *result);
simon.ford@mbed.co.uk 4:5d1359a283bc 100
rolf.meyer@arm.com 11:1c1ebd0324fa 101 #endif
rolf.meyer@arm.com 11:1c1ebd0324fa 102
emilmont 43:e2ed12d17f06 103 /** Lookup and return the object that has the given name.
simon.ford@mbed.co.uk 4:5d1359a283bc 104 *
emilmont 43:e2ed12d17f06 105 * @param name the name to lookup.
emilmont 43:e2ed12d17f06 106 * @param len the length of name.
simon.ford@mbed.co.uk 4:5d1359a283bc 107 */
simon.ford@mbed.co.uk 4:5d1359a283bc 108 static Base *lookup(const char *name, unsigned int len);
simon.ford@mbed.co.uk 0:82220227f4fa 109
simon.ford@mbed.co.uk 8:00a04e5cd407 110 static DirHandle *opendir();
simon.ford@mbed.co.uk 8:00a04e5cd407 111 friend class BaseDirHandle;
simon.ford@mbed.co.uk 8:00a04e5cd407 112
simon.ford@mbed.co.uk 0:82220227f4fa 113 protected:
simon.ford@mbed.co.uk 0:82220227f4fa 114
simon.ford@mbed.co.uk 4:5d1359a283bc 115 static Base *_head;
simon.ford@mbed.co.uk 4:5d1359a283bc 116 Base *_next;
simon.ford@mbed.co.uk 4:5d1359a283bc 117 const char *_name;
simon.ford@mbed.co.uk 5:62573be585e9 118 bool _from_construct;
simon.ford@mbed.co.uk 5:62573be585e9 119
simon.ford@mbed.co.uk 5:62573be585e9 120 private:
simon.ford@mbed.co.uk 5:62573be585e9 121
rolf.meyer@arm.com 11:1c1ebd0324fa 122 #ifdef MBED_RPC
simon.ford@mbed.co.uk 5:62573be585e9 123 static rpc_class *_classes;
simon.ford@mbed.co.uk 5:62573be585e9 124
simon.ford@mbed.co.uk 7:15d74db76485 125 static const rpc_function _base_funcs[];
simon.ford@mbed.co.uk 7:15d74db76485 126 static rpc_class _base_class;
rolf.meyer@arm.com 11:1c1ebd0324fa 127 #endif
simon.ford@mbed.co.uk 7:15d74db76485 128
simon.ford@mbed.co.uk 5:62573be585e9 129 void delete_self();
simon.ford@mbed.co.uk 5:62573be585e9 130 static void list_objs(const char *arguments, char *result);
simon.ford@mbed.co.uk 5:62573be585e9 131 static void clear(const char*,char*);
simon.ford@mbed.co.uk 5:62573be585e9 132
simon.ford@mbed.co.uk 5:62573be585e9 133 static char *new_name(Base *p);
simon.ford@mbed.co.uk 5:62573be585e9 134
simon.ford@mbed.co.uk 5:62573be585e9 135 public:
simon.ford@mbed.co.uk 5:62573be585e9 136
rolf.meyer@arm.com 11:1c1ebd0324fa 137 #ifdef MBED_RPC
emilmont 43:e2ed12d17f06 138 /** Add the class to the list of classes which can have static
simon.ford@mbed.co.uk 5:62573be585e9 139 * methods called via rpc (the static methods which can be called
simon.ford@mbed.co.uk 5:62573be585e9 140 * are defined by that class' get_rpc_class() static method).
simon.ford@mbed.co.uk 5:62573be585e9 141 */
simon.ford@mbed.co.uk 5:62573be585e9 142 template<class C>
simon.ford@mbed.co.uk 5:62573be585e9 143 static void add_rpc_class() {
simon.ford@mbed.co.uk 5:62573be585e9 144 rpc_class *c = C::get_rpc_class();
simon.ford@mbed.co.uk 5:62573be585e9 145 c->next = _classes;
simon.ford@mbed.co.uk 5:62573be585e9 146 _classes = c;
simon.ford@mbed.co.uk 5:62573be585e9 147 }
simon.ford@mbed.co.uk 5:62573be585e9 148
simon.ford@mbed.co.uk 5:62573be585e9 149 template<class C>
simon.ford@mbed.co.uk 5:62573be585e9 150 static const char *construct() {
simon.ford@mbed.co.uk 5:62573be585e9 151 Base *p = new C();
simon.ford@mbed.co.uk 5:62573be585e9 152 p->_from_construct = true;
simon.ford@mbed.co.uk 5:62573be585e9 153 if(p->_name==NULL) {
simon.ford@mbed.co.uk 5:62573be585e9 154 p->register_object(new_name(p));
simon.ford@mbed.co.uk 5:62573be585e9 155 }
simon.ford@mbed.co.uk 5:62573be585e9 156 return p->_name;
simon.ford@mbed.co.uk 5:62573be585e9 157 }
simon.ford@mbed.co.uk 5:62573be585e9 158
simon.ford@mbed.co.uk 5:62573be585e9 159 template<class C, typename A1>
simon.ford@mbed.co.uk 5:62573be585e9 160 static const char *construct(A1 arg1) {
simon.ford@mbed.co.uk 5:62573be585e9 161 Base *p = new C(arg1);
simon.ford@mbed.co.uk 5:62573be585e9 162 p->_from_construct = true;
simon.ford@mbed.co.uk 5:62573be585e9 163 if(p->_name==NULL) {
simon.ford@mbed.co.uk 5:62573be585e9 164 p->register_object(new_name(p));
simon.ford@mbed.co.uk 5:62573be585e9 165 }
simon.ford@mbed.co.uk 5:62573be585e9 166 return p->_name;
simon.ford@mbed.co.uk 5:62573be585e9 167 }
simon.ford@mbed.co.uk 5:62573be585e9 168
simon.ford@mbed.co.uk 5:62573be585e9 169 template<class C, typename A1, typename A2>
simon.ford@mbed.co.uk 5:62573be585e9 170 static const char *construct(A1 arg1, A2 arg2) {
simon.ford@mbed.co.uk 5:62573be585e9 171 Base *p = new C(arg1,arg2);
simon.ford@mbed.co.uk 5:62573be585e9 172 p->_from_construct = true;
simon.ford@mbed.co.uk 5:62573be585e9 173 if(p->_name==NULL) {
simon.ford@mbed.co.uk 5:62573be585e9 174 p->register_object(new_name(p));
simon.ford@mbed.co.uk 5:62573be585e9 175 }
simon.ford@mbed.co.uk 5:62573be585e9 176 return p->_name;
simon.ford@mbed.co.uk 5:62573be585e9 177 }
simon.ford@mbed.co.uk 5:62573be585e9 178
simon.ford@mbed.co.uk 5:62573be585e9 179 template<class C, typename A1, typename A2, typename A3>
simon.ford@mbed.co.uk 5:62573be585e9 180 static const char *construct(A1 arg1, A2 arg2, A3 arg3) {
simon.ford@mbed.co.uk 5:62573be585e9 181 Base *p = new C(arg1,arg2,arg3);
simon.ford@mbed.co.uk 5:62573be585e9 182 p->_from_construct = true;
simon.ford@mbed.co.uk 5:62573be585e9 183 if(p->_name==NULL) {
simon.ford@mbed.co.uk 5:62573be585e9 184 p->register_object(new_name(p));
simon.ford@mbed.co.uk 5:62573be585e9 185 }
simon.ford@mbed.co.uk 5:62573be585e9 186 return p->_name;
simon.ford@mbed.co.uk 5:62573be585e9 187 }
simon.ford@mbed.co.uk 5:62573be585e9 188
simon.ford@mbed.co.uk 5:62573be585e9 189 template<class C, typename A1, typename A2, typename A3, typename A4>
simon.ford@mbed.co.uk 5:62573be585e9 190 static const char *construct(A1 arg1, A2 arg2, A3 arg3, A4 arg4) {
simon.ford@mbed.co.uk 5:62573be585e9 191 Base *p = new C(arg1,arg2,arg3,arg4);
simon.ford@mbed.co.uk 5:62573be585e9 192 p->_from_construct = true;
simon.ford@mbed.co.uk 5:62573be585e9 193 if(p->_name==NULL) {
simon.ford@mbed.co.uk 5:62573be585e9 194 p->register_object(new_name(p));
simon.ford@mbed.co.uk 5:62573be585e9 195 }
simon.ford@mbed.co.uk 5:62573be585e9 196 return p->_name;
simon.ford@mbed.co.uk 5:62573be585e9 197 }
rolf.meyer@arm.com 11:1c1ebd0324fa 198 #endif
simon.ford@mbed.co.uk 4:5d1359a283bc 199
simon.ford@mbed.co.uk 0:82220227f4fa 200 };
simon.ford@mbed.co.uk 0:82220227f4fa 201
emilmont 43:e2ed12d17f06 202 /** The maximum size of object name (including terminating null byte)
simon.ford@mbed.co.uk 4:5d1359a283bc 203 * that will be recognised when using fopen to open a FileLike
simon.ford@mbed.co.uk 4:5d1359a283bc 204 * object, or when using the rpc function.
simon.ford@mbed.co.uk 4:5d1359a283bc 205 */
simon.ford@mbed.co.uk 4:5d1359a283bc 206 #define MBED_OBJECT_NAME_MAX 32
simon.ford@mbed.co.uk 4:5d1359a283bc 207
emilmont 43:e2ed12d17f06 208 /** The maximum size of rpc method name (including terminating null
simon.ford@mbed.co.uk 4:5d1359a283bc 209 * byte) that will be recognised by the rpc function (in rpc.h).
simon.ford@mbed.co.uk 4:5d1359a283bc 210 */
simon.ford@mbed.co.uk 4:5d1359a283bc 211 #define MBED_METHOD_NAME_MAX 32
simon.ford@mbed.co.uk 4:5d1359a283bc 212
simon.ford@mbed.co.uk 0:82220227f4fa 213 } // namespace mbed
simon.ford@mbed.co.uk 0:82220227f4fa 214
simon.ford@mbed.co.uk 1:6b7f447ca868 215 #endif
simon.ford@mbed.co.uk 1:6b7f447ca868 216