Embedded Wireless Workshop Sami Kibria Software Engineering Manager
Embedded Wireless Workshop Sami Kibria Software Engineering Manager
Objectives… n Heads up on Embedded Systems n BUS Protocols n Network Protocols n Wireless Protocols n n Objectives Awareness n Implications n May 15, 2004 Embedded Wireless Workshop
“Take me to your leader!” Trebek – “What are all things small” n Who is a: n Windows “Luser” n Linux User n Mac User n n May 15, 2004 The ideal: Doing specific tasks in a deterministic period of time Embedded Wireless Workshop
Pretty Interesting… n About 60% of the firmware developers I talk to are EEs. n n May 15, 2004 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 Embedded Wireless Workshop
Elementary my dear Watson… n Architectural knowledge of your system n n Everybody sees them but how do they work… Practical note: You need toys Development Kits n Development Boards n Of course – good understanding of your system n May 15, 2004 Embedded Wireless Workshop
Question #1… Image Scanner n 200 dpi – 8 bits/pixel n What is the file size of a 3 x 2 inch image? n May 15, 2004 Embedded Wireless Workshop
What are we using… n Lets talk about our system… n TINI Development Board • DS 80 micro • Uses 8051 assembly • 1 MB flash • No file system n May 15, 2004 Communications - Bluetooth Embedded Wireless Workshop
What are we using… n With your TINI knowledge you can also do Serial, ADC’s, DAC’s, 1 -Wire, Ethernet n Think of the possibilities… n n Compare vs. other processors n May 15, 2004 What about ARM 7, ARM 9, Cold. Fire…so many to choose from… Embedded Wireless Workshop
“It’s a plane…its, its. . ” n Its FLASH Gordon n n 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, May 15, 2004 Embedded Wireless Workshop
Don’t flash me again! n Question… n What does NAND and NOR stand for? • NAND: Not And (electronic logic gate) • NOR: Not Or (electronic logic gate) May 15, 2004 Embedded Wireless Workshop
Question #2… What properties does the MMU (Memory Management Unity) do for memory? n Hint: think about contiguous memory space n May 15, 2004 Embedded Wireless Workshop
FYI…”Nice Architecture” n May 15, 2004 Von Neumann versus Harvard Embedded Wireless Workshop
“Things that make you go…hmmm” n Pipelining n n Branch Prediction n May 15, 2004 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. Improves performance of pipelining by being able to predict when our stages are finishing Embedded Wireless Workshop
Acronym MAN n n Trebek: “What is a Protocol? ” Data transport bus n n Networked Systems n n n TCP/UDP IP Wireless Protocols n n n May 15, 2004 i 2 c CAN USB PAN WLAN Cellular – GSM/CDMA Embedded Wireless Workshop
I 2 C Inter-Integrated Circuit n Bi-directional 2 wire serial communication n n Serial clock • Synchronize the peripherals on Bus n May 15, 2004 Serial Data Line Embedded Wireless Workshop
CAN n Controller Area Network n n n May 15, 2004 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. Embedded Wireless Workshop
USB Universal Serial Bus n 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. n High Speed, Full Speed, and Low Speed n May 15, 2004 Embedded Wireless Workshop
“It’s all about…Communication” n Coming together and NETWORKING TCP/UDP n IP n OSI Layer n n May 15, 2004 Difference between Specification and Standard Embedded Wireless Workshop
History of the Internet ARPNET – Advanced Research Projects Agency n In 1960’s using Packet Switching n Really about getting computers communicating to each other over some distance n Now look at what it has become! n May 15, 2004 Embedded Wireless Workshop
OSI Layer Open Systems Interconnection n What is this structure? n n n May 15, 2004 Really a research model in describing the interactions of different layer protocols with one another Does TCP “use” the OSI Layer? Embedded Wireless Workshop
May 15, 2004 Embedded Wireless Workshop
Transmission Reliability n n Difference between TCP and UDP TCP is… n n n TRANSMISSION CONTROL PROTOCL Transport layer protocol Best-effort Connectionless? ? ? • Because it’s packet switched n UDP is… n n n May 15, 2004 USER DATAGRAM PROTOCOL Transport Layer protocol Not meant for reliability but for speed! Embedded Wireless Workshop
Question #3… What does RTP stand for (in terms of networking)? n What transmission packet protocol does Vo. IP use? n Why does it use this type of transmission packet? n May 15, 2004 Embedded Wireless Workshop
“Look ma, no wires!” PAN n WLAN n WAN n May 15, 2004 Embedded Wireless Workshop
Bluetooth - PAN n More than just Bluetooth n RFID • Radio Frequency Identification n NFC • Near Field Communication May 15, 2004 Embedded Wireless Workshop
WLAN – 802. 11 a/b/g n Modulation/Demodulation Techniques different n Why? • Different speeds n May 15, 2004 The future…Nortel says… 802. 11 n? ? ? Embedded Wireless Workshop
WAN – Cellular (GSM/CDMA) GSM – Global System for Mobile Communications n CDMA – Code Division Multiple Access n All can have IP based networks n May 15, 2004 Embedded Wireless Workshop
Evolution of Cellular n When from: Analog to digital domain n Multiple frequencies, one channel per frequency to multiple frequencies to multiple channels per frequency n May 15, 2004 Embedded Wireless Workshop
“Aye here’s the rub…” May 15, 2004 Embedded Wireless Workshop
“Okay…but…” n Iders motto: n “Make a few bucks, have a few laughs. ” • In that order. n May 15, 2004 As much as we would like to say it…we need to make money to survive Embedded Wireless Workshop
Well, lets talk about Bluetooth Stack n How the stack communicates n How I coded it…yes call me a “code poet!” n May 15, 2004 Embedded Wireless Workshop
The Internals…Linux May 15, 2004 Embedded Wireless Workshop
Interleaved Code… n n n I am simply going to talk about using the Java Serial Bluetooth Driver Initialize the Bluetooth Object 4 Main Methods n n May 15, 2004 Find other Bluetooth Devices Open Connection Send Data Close Connection Embedded Wireless Workshop
It should look like… public class Bluetooth. Test { public static void main(String args[]) { Bluetooth bt = new Bluetooth(args…); ret_val = bt. find. Devices(); Byte arr[] = bt. get. Addr. Array(); 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. create. ACLConnection(tmp); bt. send. ACLPkt(pkt, pkt_length); bt. close. ACLConn(tmp): } } } May 15, 2004 Embedded Wireless Workshop
What about receiving data… public void read. Bluetooth. Data(Bluetooth bt) { while(true) { if(bt. get. Bluetooth. Data. Arrived() == true) { int buffer_size = bt. get. Read. Buffer. Data. Size(); byte buffer[] = bt. get. Read. Buffer. Data(); /* 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. set. Bluetooth. Data. Arrived(false); } } } May 15, 2004 Embedded Wireless Workshop
“So how does it all work? ” n Its all about understanding… Architecture n Usability n Communication n Interoperability n n May 15, 2004 Remember…we need to understand the system and its components Embedded Wireless Workshop
Wow…what a day! n Information Overload… n n May 15, 2004 Why did I have so much information… Thanks for all you patience, time… Embedded Wireless Workshop
- Slides: 37