370 likes | 555 Views
Embedded Wireless Workshop. Sami Kibria Software Engineering Manager. Objectives…. Heads up on Embedded Systems BUS Protocols Network Protocols Wireless Protocols Objectives Awareness Implications. “Take me to your leader!”. Trebek – “What are all things small” Who is a:
E N D
Embedded Wireless Workshop Sami Kibria Software Engineering Manager
Objectives… • Heads up on • Embedded Systems • BUS Protocols • Network Protocols • Wireless Protocols • Objectives • Awareness • Implications
“Take me to your leader!” • Trebek – “What are all things small” • Who is a: • Windows “Luser” • Linux User • Mac User • The ideal: Doing specific tasks in a deterministic period of time
Pretty Interesting… • About 60% of the firmware developers I talk to are EEs. • Computer science and computer engineering majors make up most of the rest, with a smattering of physics and even liberal arts majors tossed in to fill out the balance. • Regardless of who you are, processor exists to accommodate/challenge your knowledge
Elementary my dear Watson… • Architectural knowledge of your system • Everybody sees them but how do they work… • Practical note: You need toys • Development Kits • Development Boards • Of course – good understanding of your system
Question #1… • Image Scanner • 200 dpi – 8 bits/pixel • What is the file size of a 3x2 inch image?
What are we using… • Lets talk about our system… • TINI Development Board • DS80 micro • Uses 8051 assembly • 1 MB flash • No file system • Communications - Bluetooth
What are we using… • With your TINI knowledge you can also do • Serial, ADC’s, DAC’s, 1-Wire, Ethernet • Think of the possibilities… • Compare vs. other processors • What about ARM7, ARM9, ColdFire…so many to choose from…
“It’s a plane…its, its..” • Its FLASH Gordon • Embedded File Systems • NAND vs NOR flash • Its actually a form of EEPROM • In order to reset a bit you have to erase an entire block of memory • Its actually arranged into blocks • Main difference – how data is written • NAND flash is written by loading the required data into an internal buffer one byte at time, then issuing a write command. • While NOR flash allows bits to be cleared individually until there are none left to be cleared,
Don’t flash me again! • Question… • What does NAND and NOR stand for? • NAND: Not And (electronic logic gate) • NOR: Not Or (electronic logic gate)
Question #2… • What properties does the MMU (Memory Management Unity) do for memory? • Hint: think about contiguous memory space
FYI…”Nice Architecture” • Von Neumann versus Harvard
“Things that make you go…hmmm” • Pipelining • is an implementation technique in which multiple instructions are overlapped in execution. Instructions are broken down into stages and while one instruction is executing one stage another instruction can simultaneously execute another stage. • Branch Prediction • Improves performance of pipelining by being able to predict when our stages are finishing
Acronym MAN • Trebek: “What is a Protocol?” • Data transport bus • i2c • CAN • USB • Networked Systems • TCP/UDP • IP • Wireless Protocols • PAN • WLAN • Cellular – GSM/CDMA
I2C • Inter-Integrated Circuit • Bi-directional 2 wire serial communication • Serial clock • Synchronize the peripherals on Bus • Serial Data Line
CAN • Controller Area Network • Using CAN, peer stations (controllers, sensors and actuators) are connected via a serial bus • Many stations, therefore it necessitates an exchange of data between them. • With conventional systems, data is exchanged by means of dedicated signal lines, but this is becoming increasingly difficult and expensive as control functions become ever more complex.
USB • Universal Serial Bus • The USB is a medium-speed serial data bus designed to carry relatively large amounts of data over relatively short cables: up to about five meters long. • High Speed, Full Speed, and Low Speed
“It’s all about…Communication” • Coming together and NETWORKING • TCP/UDP • IP • OSI Layer • Difference between Specification and Standard
History of the Internet • ARPNET – Advanced Research Projects Agency • In 1960’s using Packet Switching • Really about getting computers communicating to each other over some distance • Now look at what it has become!
OSI Layer • Open Systems Interconnection • What is this structure? • Really a research model in describing the interactions of different layer protocols with one another • Does TCP “use” the OSI Layer?
Transmission Reliability • Difference between TCP and UDP • TCP is… • TRANSMISSION CONTROL PROTOCL • Transport layer protocol • Best-effort Connectionless??? • Because it’s packet switched • UDP is… • USER DATAGRAM PROTOCOL • Transport Layer protocol • Not meant for reliability but for speed!
Question #3… • What does RTP stand for (in terms of networking)? • What transmission packet protocol does VoIP use? • Why does it use this type of transmission packet?
“Look ma, no wires!” • PAN • WLAN • WAN
Bluetooth - PAN • More than just Bluetooth • RFID • Radio Frequency Identification • NFC • Near Field Communication
WLAN – 802.11a/b/g • Modulation/Demodulation Techniques different • Why? • Different speeds • The future…Nortel says…802.11n???
WAN – Cellular (GSM/CDMA) • GSM – Global System for Mobile Communications • CDMA – Code Division Multiple Access • All can have IP based networks
Evolution of Cellular • When from: • Analog to digital domain • Multiple frequencies, one channel per frequency to multiple frequencies to multiple channels per frequency
“Okay…but…” • Iders motto: • “Make a few bucks, have a few laughs.” • In that order. • As much as we would like to say it…we need to make money to survive
Well, lets talk about Bluetooth • Stack • How the stack communicates • How I coded it…yes call me a “code poet!”
Interleaved Code… • I am simply going to talk about using the Java Serial Bluetooth Driver • Initialize the Bluetooth Object • 4 Main Methods • Find other Bluetooth Devices • Open Connection • Send Data • Close Connection
It should look like… public class BluetoothTest { public static void main(String args[]) { Bluetooth bt = new Bluetooth(args…); ret_val = bt.findDevices(); Byte arr[] = bt.getAddrArray(); for(i=0;i<ret_val;i++) { Byte tmp[] = arr[addresses]; //we have to circle through address array to get the first, and the next addresses found bt.createACLConnection(tmp); bt.sendACLPkt(pkt,pkt_length); bt.closeACLConn(tmp): } } }
What about receiving data… public void readBluetoothData(Bluetooth bt) { while(true) { if(bt.getBluetoothDataArrived() == true) { int buffer_size = bt.getReadBufferDataSize(); byte buffer[] = bt.getReadBufferData(); /* do something with the buffer, lets print out the string */ String tmp = ""; for(int i=0;i<buffer_size;i++) { tmp += (char)buffer[i]; } System.out.println("This is what we got...."); System.out.println(tmp); bt.setBluetoothDataArrived(false); } } }
“So how does it all work?” • Its all about understanding… • Architecture • Usability • Communication • Interoperability • Remember…we need to understand the system and its components
Wow…what a day! • Information Overload… • Why did I have so much information… • Thanks for all you patience, time…