hardware technology

55
SM3121 SM3121 Hardware Hardware Technology Technology Mark Green Mark Green School of Creative Media School of Creative Media

Upload: flashdomain

Post on 05-Dec-2014

256 views

Category:

Documents


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Hardware Technology

SM3121SM3121Hardware TechnologyHardware Technology

Mark GreenMark Green

School of Creative MediaSchool of Creative Media

Page 2: Hardware Technology

IntroductionIntroduction

Start by looking at some of the technology Start by looking at some of the technology involvedinvolved

Not very technical, enough to give an idea Not very technical, enough to give an idea of what’s possibleof what’s possible

Need to know the limitations, why things Need to know the limitations, why things are done a particular wayare done a particular way

Page 3: Hardware Technology

MicroprocessorsMicroprocessors

Need to have some type of computer, this Need to have some type of computer, this is the heartis the heart

All computers have microprocessors, so All computers have microprocessors, so what’s the difference here??what’s the difference here??

In computers microprocessor use lots of In computers microprocessor use lots of power, they produce lots of heat, they power, they produce lots of heat, they need fans that make lots of noiseneed fans that make lots of noise

Picture this in your mobile phone!Picture this in your mobile phone!

Page 4: Hardware Technology

MicroprocessorsMicroprocessors

Mobile phones, PDA, etc don’t plug into Mobile phones, PDA, etc don’t plug into the wall, they are mobile, they use the wall, they are mobile, they use batteriesbatteries

Power is very limited, want devices to run Power is very limited, want devices to run for many hours, at least a dayfor many hours, at least a day

Processors must use very little power, if Processors must use very little power, if device isn’t being used it should be almost device isn’t being used it should be almost nothing, but still want instant responsenothing, but still want instant response

Page 5: Hardware Technology

MicroprocessorsMicroprocessors

These devices are smallThese devices are small Can’t generate a lot of heat, can’t have a Can’t generate a lot of heat, can’t have a

fan (won’t work with mobile phone)fan (won’t work with mobile phone) Don’t want to hold something that is over Don’t want to hold something that is over

50C50C Microprocessor should run cool, doesn’t Microprocessor should run cool, doesn’t

need fan or coolingneed fan or cooling This goes well with low powerThis goes well with low power

Page 6: Hardware Technology

MicroprocessorsMicroprocessors

Size is also important, mobile phones Size is also important, mobile phones need to be smallneed to be small

Need to have memory, don’t want a Need to have memory, don’t want a separate chip for this, combined with separate chip for this, combined with microprocessormicroprocessor

Often combine other functions that are Often combine other functions that are separate chips in a PCseparate chips in a PC

Page 7: Hardware Technology

MicroprocessorsMicroprocessors

So we aren’t going to use a 3Ghz Pentium So we aren’t going to use a 3Ghz Pentium 4 processor, but what are we going to 4 processor, but what are we going to use?use?

There are several chip families that have There are several chip families that have been developed for low power mobile been developed for low power mobile applicationsapplications

Intel and Motorola have popular lines, Intel and Motorola have popular lines, there are also several smaller there are also several smaller manufacturersmanufacturers

Page 8: Hardware Technology

MicroprocessorsMicroprocessors

Cost is also very importantCost is also very important Pentium 4 chips cost more than most Pentium 4 chips cost more than most

mobile phonesmobile phones We need to keep costs low, implications:We need to keep costs low, implications:

Not as fast as PCsNot as fast as PCs Not as many features as PCsNot as many features as PCs Combine the functions of several chips onto Combine the functions of several chips onto

one chipone chip

Page 9: Hardware Technology

MicrocontrollersMicrocontrollers

A microcontroller is a single chip A microcontroller is a single chip computer, it usually has:computer, it usually has: ProcessorProcessor ROM memoryROM memory RAM memoryRAM memory Digital input and outputDigital input and output Analogue input and outputAnalogue input and output Communications to hostCommunications to host

Page 10: Hardware Technology

MicrocontrollersMicrocontrollers

Page 11: Hardware Technology

MicrocontrollersMicrocontrollers

Basically have everything required to run a Basically have everything required to run a dedicated application, not a general dedicated application, not a general purpose processorpurpose processor

Used in:Used in: ToysToys CarsCars AppliancesAppliances MP3 playersMP3 players Mobile phonesMobile phones

Page 12: Hardware Technology

MicrocontrollersMicrocontrollers

Processors are not fast, optimized for low Processors are not fast, optimized for low powerpower

Can have as little as 128 bytes of memory, Can have as little as 128 bytes of memory, but some have a lot more (1 Mbyte)but some have a lot more (1 Mbyte)

Usually have serial or USB connection to Usually have serial or USB connection to host, but some use ethernethost, but some use ethernet

Programmed in assembler, basic or C, Programmed in assembler, basic or C, programs are usually quite shortprograms are usually quite short

Page 13: Hardware Technology

MemoryMemory

Many types of memory are used in toys Many types of memory are used in toys and gadgets, depends on the productand gadgets, depends on the product

RAM: this is what we are used to on PCs, RAM: this is what we are used to on PCs, memory that we can read and writememory that we can read and write

ROM: read only memory, most of the ROM: read only memory, most of the software is in ROM, don’t have a disk so software is in ROM, don’t have a disk so we need to get the software from we need to get the software from somewhere, ROM is the standard waysomewhere, ROM is the standard way

Page 14: Hardware Technology

MemoryMemory

Problem with ROM: written once when the Problem with ROM: written once when the chip is made, we can’t change itchip is made, we can’t change it

Different from PC, easy to change Different from PC, easy to change software, easy to add more softwaresoftware, easy to add more software

With ROM we are stuck with what we gotWith ROM we are stuck with what we got Can put programs in RAM, but they will be Can put programs in RAM, but they will be

lost when the batteries run out or are lost when the batteries run out or are changedchanged

Page 15: Hardware Technology

MemoryMemory

To develop applications we need memory To develop applications we need memory we can write, and that will stay therewe can write, and that will stay there

This is a common problem, so there are This is a common problem, so there are several solutionsseveral solutions

EPROM: electrically programmable ROM, EPROM: electrically programmable ROM, use special hardware to write contents of use special hardware to write contents of memory (not very expensive)memory (not very expensive)

Some can be erased and rewritten Some can be erased and rewritten (EEPROM)(EEPROM)

Page 16: Hardware Technology

MemoryMemory

Flash memory: a better solution, can be Flash memory: a better solution, can be written many times (around 1 million) and written many times (around 1 million) and holds its dataholds its data

Available in a range of sizes, common Available in a range of sizes, common sizes are 64, 128 and 256 Mbytesizes are 64, 128 and 256 Mbyte

One problem is that there are too many One problem is that there are too many different standards: CF, SD, MM, etc, 5 or different standards: CF, SD, MM, etc, 5 or 6 major standards6 major standards

Page 17: Hardware Technology

MemoryMemory

Flash memory solves our application Flash memory solves our application development problem, can be used with a development problem, can be used with a range of devices:range of devices: Mobile phoneMobile phone PDAPDA GameboyGameboy

Write the flash memory, insert it into Write the flash memory, insert it into device and you are ready to godevice and you are ready to go

Page 18: Hardware Technology

SensorsSensors

Recall the difference between analogue Recall the difference between analogue and digital:and digital: Digital: on or off, 0 or 1, this is what a Digital: on or off, 0 or 1, this is what a

computer understands, combine bits to computer understands, combine bits to produce bytes, etcproduce bytes, etc

Analogue: real continuous values, what we Analogue: real continuous values, what we find in the real world, temperature, pressure, find in the real world, temperature, pressure, speed, cannot be understood by a computerspeed, cannot be understood by a computer

Page 19: Hardware Technology

SensorsSensors

Most microcontrollers have both digital Most microcontrollers have both digital and analogue I/Oand analogue I/O

Digital input can be used for simple Digital input can be used for simple sensors:sensors: Switch is open or closedSwitch is open or closed Simple light detectorsSimple light detectors

Digital output can be used as a switch, Digital output can be used as a switch, turns lights on, control devices, even run turns lights on, control devices, even run motorsmotors

Page 20: Hardware Technology

SensorsSensors

Digital I/O is typically 1 bit, simple on or offDigital I/O is typically 1 bit, simple on or off Analogue gets more complex, need a way Analogue gets more complex, need a way

of converting between digital and of converting between digital and analogue worldsanalogue worlds

A/D – analogue to digital converter, A/D – analogue to digital converter, converts an analogue signal into a digital converts an analogue signal into a digital value, many ways of doing this, will only value, many ways of doing this, will only look at the very basicslook at the very basics

Page 21: Hardware Technology

SensorsSensors

Bits per sample, precision of the value, Bits per sample, precision of the value, most basic is 8 bits, analogue signal most basic is 8 bits, analogue signal converted to a value from -128 to 127converted to a value from -128 to 127

12 bit A/D converters are also common, 12 bit A/D converters are also common, but more expensivebut more expensive

For simple signals like light intensity, For simple signals like light intensity, temperature, speed 8 or 12 bits is good temperature, speed 8 or 12 bits is good enough, for sound need 16 bitsenough, for sound need 16 bits

Page 22: Hardware Technology

SensorsSensors

Usually have more than one analogue Usually have more than one analogue input, but A/Ds are expensive, don’t want input, but A/Ds are expensive, don’t want to have one for each inputto have one for each input

Light level, temperature, speed don’t Light level, temperature, speed don’t change very quickly, only need to sample change very quickly, only need to sample a few times per seconda few times per second

Can share the A/D converter, can have Can share the A/D converter, can have multiple channels (usually 8) select multiple channels (usually 8) select channel and read the valuechannel and read the value

Page 23: Hardware Technology

SensorsSensors

D/A: digital to analogue converterD/A: digital to analogue converter Usually 8 to 12 bitsUsually 8 to 12 bits Usually 1 or 2 per microcontrollerUsually 1 or 2 per microcontroller Can’t use channels, need to send a Can’t use channels, need to send a

continuous analogue value to device, such continuous analogue value to device, such as a motor or lightas a motor or light

Page 24: Hardware Technology

SensorsSensors

What can we sense?What can we sense? Depends upon your imagination and Depends upon your imagination and

moneymoney Easy things are light level, temperature, Easy things are light level, temperature,

pressure, touch, can get relatively cheap pressure, touch, can get relatively cheap sensors for these, $25HK rangesensors for these, $25HK range

Can also measure distance, range of Can also measure distance, range of devices for this, can be quite expensivedevices for this, can be quite expensive

Page 25: Hardware Technology

SensorsSensors

Some consider cameras to be the ultimate Some consider cameras to be the ultimate sensor, can see everything in the sensor, can see everything in the environmentenvironment

Problems:Problems: Expensive compared to other sensorsExpensive compared to other sensors Require a lot of processor power, we don’t Require a lot of processor power, we don’t

have thishave this Hard to programHard to program

Page 26: Hardware Technology

ActuatorsActuators

Cause something to happen, our output Cause something to happen, our output devicesdevices

Could be as simple as a lightCould be as simple as a light Digital output can be used as a switch, Digital output can be used as a switch,

turn a light on or offturn a light on or off Typically low voltage off of a Typically low voltage off of a

microcontroller, need to save powermicrocontroller, need to save power Can use a relay to switch larger voltagesCan use a relay to switch larger voltages

Page 27: Hardware Technology

ActuatorsActuators

Motors are common actuatorsMotors are common actuators Several ways to control themSeveral ways to control them Simple motors use an analogue signal, Simple motors use an analogue signal,

speed controlled by voltagespeed controlled by voltage Cheap and easy, but not very accurateCheap and easy, but not very accurate Can control direction and to some extent Can control direction and to some extent

the speed, but cannot accurately the speed, but cannot accurately determine how far it will godetermine how far it will go

Page 28: Hardware Technology

ActuatorsActuators

Stepper motors give us much more Stepper motors give us much more control, but at a pricecontrol, but at a price

Motor rotates a fixed amount each time it Motor rotates a fixed amount each time it gets a pulse, usually quite accurategets a pulse, usually quite accurate

The faster the pulses, the faster the motor The faster the pulses, the faster the motor spins, so we have some control over its spins, so we have some control over its speedspeed

Counting pulses tells us how far we have Counting pulses tells us how far we have gonegone

Page 29: Hardware Technology

DisplaysDisplays

No 17” LCD monitor or CRT, way too big No 17” LCD monitor or CRT, way too big and requires too much powerand requires too much power

Many devices don’t have displays, but Many devices don’t have displays, but they are common on mobile phones and they are common on mobile phones and PDAsPDAs

Display must be low power, or it will drain Display must be low power, or it will drain the batterythe battery

Also needs to be small and visible in bright Also needs to be small and visible in bright environmentsenvironments

Page 30: Hardware Technology

DisplaysDisplays

LCD displays require very little power, the LCD displays require very little power, the most common form of display for small most common form of display for small devicesdevices

The LCD itself doesn’t require much The LCD itself doesn’t require much power, but its hard to see on its ownpower, but its hard to see on its own

Some devices just use the LCD, like some Some devices just use the LCD, like some Gameboy models, but for most people this Gameboy models, but for most people this isn’t good enoughisn’t good enough

Page 31: Hardware Technology

DisplaysDisplays

Usually have a light behind the LCD, Usually have a light behind the LCD, makes it much easier to seemakes it much easier to see

Common on mobile phones and PDAsCommon on mobile phones and PDAs Problem, the light requires much more Problem, the light requires much more

power than the LCDpower than the LCD Only use light when user is interacting with Only use light when user is interacting with

device, turn it off quicklydevice, turn it off quickly Assume user can read display is a minute Assume user can read display is a minute

or twoor two

Page 32: Hardware Technology

DisplaysDisplays

Early LCD displays were black and whiteEarly LCD displays were black and white Colour introduced in last few years, Colour introduced in last few years,

common to have 12 bits or 16 bits of common to have 12 bits or 16 bits of colourcolour

Since devices are small, displays must Since devices are small, displays must also be small, typically only a few inchesalso be small, typically only a few inches

This limits the resolution of the displays, This limits the resolution of the displays, must be able to read themmust be able to read them

Page 33: Hardware Technology

DisplaysDisplays

PDAs have 320x240 displays, can go PDAs have 320x240 displays, can go higher but may not be worth ithigher but may not be worth it

Higher resolution means smaller pixels, Higher resolution means smaller pixels, characters will be smaller, too hard to readcharacters will be smaller, too hard to read

Mobile phones are harder, displays are Mobile phones are harder, displays are usually smaller, want phones to be smallusually smaller, want phones to be small

Need to be able to read while walking, Need to be able to read while walking, need to have larger textneed to have larger text

Page 34: Hardware Technology

Case StudiesCase Studies

Look at some typical devices to see how Look at some typical devices to see how this all fits togetherthis all fits together

Introduce some of the terms that we will Introduce some of the terms that we will use lateruse later

Unlike PCs, there is not a lot of technical Unlike PCs, there is not a lot of technical information on these devicesinformation on these devices

Consumer devices, don’t need to provide Consumer devices, don’t need to provide information to programmers, etcinformation to programmers, etc

Page 35: Hardware Technology

Arm ProcessorArm Processor

One of the most popular processor One of the most popular processor families for mobile devicesfamilies for mobile devices

Processor design licensed to other Processor design licensed to other companies (Intel, Samsung, Fujitsu, etc), companies (Intel, Samsung, Fujitsu, etc), also produce custom designs for devicesalso produce custom designs for devices

For details see For details see http://www.arm.comhttp://www.arm.com Found in everything from phones, PDAs Found in everything from phones, PDAs

and GameBoysand GameBoys

Page 36: Hardware Technology

Arm ProcessorArm Processor

Wide range of processors:Wide range of processors: ARMARM

• 16/32 bit16/32 bit• Low power, low speed, smallLow power, low speed, small

StrongARMStrongARM• 32 bit32 bit• Medium speed, low powerMedium speed, low power

XScaleXScale• 32 bit32 bit• High end, expensive, medium powerHigh end, expensive, medium power

Page 37: Hardware Technology

Mobile PhonesMobile Phones

Wide range of architectures, usually Wide range of architectures, usually include:include: ProcessorProcessor MemoryMemory Phone network interfacePhone network interface DisplayDisplay KeypadKeypad

Little technical information, tends to Little technical information, tends to change rapidlychange rapidly

Page 38: Hardware Technology

Nokia Series 60Nokia Series 60

Nokia has several phone series, vary on Nokia has several phone series, vary on price and featuresprice and features

Series 60 is for high end phone, including Series 60 is for high end phone, including N-GageN-Gage

Symbian OS, Supports applications in:Symbian OS, Supports applications in: C/C++C/C++ JavaJava HTML, SMIL, MMS, etcHTML, SMIL, MMS, etc

Page 39: Hardware Technology

Nokia Series 60Nokia Series 60

Latest phone is the 6600:Latest phone is the 6600: ARM (StrongARM?) 100 MHz (?) processorARM (StrongARM?) 100 MHz (?) processor 176x208 display, 16 bit colour176x208 display, 16 bit colour 6 Mbyte memory6 Mbyte memory Flash memory slotFlash memory slot Bluetooth, infrared connectivityBluetooth, infrared connectivity Can sync with PCCan sync with PC

Page 40: Hardware Technology

Mobile PhonesMobile Phones

Most modern mobile phones have some Most modern mobile phones have some type of web browser, several standards for type of web browser, several standards for thisthis

SMS is standard, MMS is becoming more SMS is standard, MMS is becoming more popularpopular

Java is becoming standard on medium to Java is becoming standard on medium to high end phoneshigh end phones

Small amount of memory, usually around Small amount of memory, usually around 1 MByte1 MByte

Page 41: Hardware Technology

PDAPDA

Two basic families of PDAs:Two basic families of PDAs: PalmPalm Windows CEWindows CE

There are a few other types, but they There are a few other types, but they aren’t very populararen’t very popular

Two families address two market areas Two families address two market areas with little overlapwith little overlap

Will mainly look at Windows CEWill mainly look at Windows CE

Page 42: Hardware Technology

PalmPalm

Palm aims at low end of market, cheapest Palm aims at low end of market, cheapest devices are Palm baseddevices are Palm based

Can run on very limited hardwareCan run on very limited hardware Viewed as an appliance, replace Viewed as an appliance, replace

notepads, calendars, meeting schedulesnotepads, calendars, meeting schedules Not particularly friendly to developers, Not particularly friendly to developers,

viewed more as a closed systemviewed more as a closed system Not very expandableNot very expandable

Page 43: Hardware Technology

Windows CEWindows CE

Aimed at more high end devicesAimed at more high end devices Needs more hardware than PalmNeeds more hardware than Palm Viewed as a miniature version of office PCViewed as a miniature version of office PC Take your office with youTake your office with you Friendly to developers (free development Friendly to developers (free development

tools), similar to Windows on PCtools), similar to Windows on PC Easy to expand, add new featuresEasy to expand, add new features

Page 44: Hardware Technology

iPAQiPAQ

Popular PDA developed by Compaq Popular PDA developed by Compaq before they were bought by HPbefore they were bought by HP

Line continued by HPLine continued by HP One of the best Windows CE devicesOne of the best Windows CE devices Range of devices available, vary on Range of devices available, vary on

processor speed, memory, featuresprocessor speed, memory, features Price range $2000 - $5000 HKPrice range $2000 - $5000 HK

Page 45: Hardware Technology

iPAQiPAQ

Basic hardware featuresBasic hardware features StrongARM / XScale processor, range from StrongARM / XScale processor, range from

200 to 400 MHz200 to 400 MHz 64 MByte RAM, 32 MByte ROM64 MByte RAM, 32 MByte ROM 240 x 320 display, 16 bit colour240 x 320 display, 16 bit colour Flash memory cardFlash memory card Bluetooth, infrared connectivity (not all Bluetooth, infrared connectivity (not all

models)models) Can sync with PCCan sync with PC

Page 46: Hardware Technology

PDAPDA

iPAQ is the high end, most other PDAs iPAQ is the high end, most other PDAs have lower performance, fewer featureshave lower performance, fewer features

Typical processor speeds are in the Typical processor speeds are in the 200Mhz range200Mhz range

Most have 32Mbyte or less memory, Palm Most have 32Mbyte or less memory, Palm devices tend to have lessdevices tend to have less

Not all have good connectivity, maybe just Not all have good connectivity, maybe just serial or USBserial or USB

Page 47: Hardware Technology

GameBoyGameBoy

There have been many versions of this There have been many versions of this device over the yearsdevice over the years

One of the most successful mobile devicesOne of the most successful mobile devices Look at the GBA, the most recent version Look at the GBA, the most recent version

of the deviceof the device These are cheap devices, from $500 to These are cheap devices, from $500 to

$1500 HK, depending upon the version $1500 HK, depending upon the version and packagingand packaging

Page 48: Hardware Technology

GameBoyGameBoy

The hardwareThe hardware ARM7TDMI processor at 16.78 MHzARM7TDMI processor at 16.78 MHz 32 Kbytes of internal RAM, 256 Kbytes of 32 Kbytes of internal RAM, 256 Kbytes of

external RAMexternal RAM Up to 240x160 display with up to 15 bit colourUp to 240x160 display with up to 15 bit colour ROM cartridges or flash memory used for ROM cartridges or flash memory used for

games, up to 32 Mbytes of data per gamegames, up to 32 Mbytes of data per game Serial connection for external communicationsSerial connection for external communications

Page 49: Hardware Technology

GameBoyGameBoy

There have been other mobile game There have been other mobile game devices, but this is the one that lasteddevices, but this is the one that lasted

This is not a powerful platformThis is not a powerful platform Hardware a bit of a hack, tries to be Hardware a bit of a hack, tries to be

compatible with older versionscompatible with older versions Can do independent development, but this Can do independent development, but this

is not supported by Nintendois not supported by Nintendo

Page 50: Hardware Technology

NoteNote

If you are interested in console game If you are interested in console game development the GameBoy is a good development the GameBoy is a good place to startplace to start

Not as complicated as consoles, but a lot Not as complicated as consoles, but a lot of the same techniques are usedof the same techniques are used

Can get everything you need for under Can get everything you need for under $1000HK, including the GameBoy!$1000HK, including the GameBoy!

Page 51: Hardware Technology

SummarySummary

Not near as powerful as a PC, but doesn’t Not near as powerful as a PC, but doesn’t have to do as much workhave to do as much work

Small screens, need to think carefully Small screens, need to think carefully about screen spaceabout screen space

Development not as easy as PCs, can Development not as easy as PCs, can have emulators for PCs, but really need to have emulators for PCs, but really need to get content onto device for testingget content onto device for testing

Need to have good communications for Need to have good communications for thisthis

Page 52: Hardware Technology

So What?So What?

Why do I care about all of this?? I’m just Why do I care about all of this?? I’m just going to produce web pages for mobile going to produce web pages for mobile phonesphones

Most web designers work on PCs, faster Most web designers work on PCs, faster processors, special hardware for graphics processors, special hardware for graphics and mediaand media

This hardware doesn’t exist on most This hardware doesn’t exist on most mobile devices, applications could run mobile devices, applications could run much slowermuch slower

Page 53: Hardware Technology

So What?So What?

About 10% of the raw processor powerAbout 10% of the raw processor power No floating point -> slower media playbackNo floating point -> slower media playback No special multimedia instructions -> No special multimedia instructions ->

slower media playbackslower media playback A web site with good performance on a PC A web site with good performance on a PC

may be unusable on a mobile phone or may be unusable on a mobile phone or PDAPDA

Must be careful in developmentMust be careful in development

Page 54: Hardware Technology

So What?So What?

Large difference in mobile devicesLarge difference in mobile devices Application may run on latest phone, but Application may run on latest phone, but

won’t run on older oneswon’t run on older ones Large number of phones are two or more Large number of phones are two or more

years oldyears old May not care about this, willing to let May not care about this, willing to let

market grow as people replace their market grow as people replace their devicesdevices

Page 55: Hardware Technology

FutureFuture

Rapidly evolving area, faster than PCsRapidly evolving area, faster than PCs Adding multimedia capabilities to mobile Adding multimedia capabilities to mobile

devices, special processor for video, devices, special processor for video, images and soundimages and sound

3D graphics hardware for mobile devices, 3D graphics hardware for mobile devices, OpenGL-ESOpenGL-ES

Similar performance / features to 1995 era Similar performance / features to 1995 era PC graphics cardsPC graphics cards