ebook img

Universal Display Book for PIC Microcontrollers PDF

194 Pages·2008·4.951 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Universal Display Book for PIC Microcontrollers

Richard Grodzik R.Grodzik UniversalDisplayBook forPICMicrocontrollers R. Grodzik Universal Display Book for PIC Microcontrollers ElektorInternationalMediaBV Postbus11 6114ZGSusteren TheNetherlands Acknowledgement I would like to dedicate this book to my mother – Walentyna, without whose support, kindnessandobjectivity,thisbookwouldneverhavebeenpossible. RichardGrodzik,september2007. Allrightsreserved.Nopartofthisbookmaybereproducedinanymaterialform,includ- ingphotocopying,orstoringinanymediumbyelectronicmeansandwhetherornottran- siently or incidentally to some other use of this publication, without the written permissionofthecopyrightholderexceptinaccordancewiththeprovisionsoftheCopy- right,DesignsandPatentsAct1988 orunderthetermsofalicenceissuedby theCopy- right Licensing Agency Ltd, 90 Tottenham Court Road, London, England W1P 9HE. Applications for the copyright holder’s written permission to reproduce any part of this publicationshouldbeaddressedtothepublishers. Thepublishershaveusedtheirbesteffortsinensuringthecorrectnessoftheinformation containedinthisbook.Theydonotassume,andherebydisclaim,anyliabilitytoanyparty foranylossordamagecausedbyerrorsoromissionsinthisbook,whethersucherrorsor omissionsresultfromnegligence,accidentoranyothercause. BritishLibraryCataloguinginPublicationData AcataloguerecordforthisbookisavailablefromtheBritishLibrary ISBN978-0-905705-73-6 NUR980 Prepressproduction:Autronic,Blaricum Designcover:HelfrichOntwerpbureau,Deventer FirstpublishedintheUnitedKingdom2008 PrintedintheNetherlandsbyWilco,Amersfoort ©ElektorElectronics2008 089007/UK Preface Thisbookisapracticalintroductiontousingandinterfacingmanytypesofelectronicdis- plays to Arizona Microchip’s range of embedded microcontrollers, commonly know as ‘PIC chips’. From the simple LED to colour graphic displays, the reader is shown the hardwareinterfacerequirementsandthesoftwareprogrammingbothinAssemblerand/or MPLABC18Ccompilertoachieveafunctioningdisplay.Inaddition,asmallintroduc- tory tutorial for using the freely available ‘EAGLE’ PCB/Schematic CAD tool is in- cluded. ThePICmicrocontrollerscoveredinthisbookincludethePIC12C508,PIC12F629/675, PIC16F84,PIC16F876,PIC18F252, PIC18F452andthe PIC18F4550. Toutilisethevariousdisplays,manycompletecasestudies,fromasimpleeggtimerusing asingle 7-segmentLEDdisplay toanelectroniccompasswithcolour graphic LCDdis- playareincludedinthisbook. I hope that the reader enjoys constructing some of these projects, since complete sche- maticdrawingsareincluded,includingthesourcecodeandHexdumpforthevariousPIC microcontrollers. Inaddition,allthesourcecodeexamplesinthebookmaybedownloadedfromtheelec- tor.comwebsiteandthePDFdata-sheetfilesfromtherelevantmanufacturer’swebsites forallthecasestudies. 5 6 TableofContents Table of Contents Preface 5 1 Lightemittingdiodes 9 1.1 Historyofthelightemittingdiode 9 1.2 LEDcharacteristicsandparameters 10 1.3 PICinterfaceforLEDcircuits–designandprogramming 14 1.4 CaseStudyRGBVGAmonitortester 32 1.5 CaseStudyChristmaslight 35 1.6 CaseStudy3channelsoundtolight 39 2 Whitelightemittingdiodes 44 2.1 PWMLEDbrightnessandvoltagecontrol 44 2.2 TPS60403chargepumpvoltageinverter 49 2.3 TPS61040lowpowerDC/DCboostconverter 50 2.4 LT1054switched-capacitorvoltageconverter 52 2.5 MAX1848whiteLEDstep-upconverter 53 3 7-segmentDisplays 55 3.1 Fundamentalsof7-segmentLEDdisplays 55 3.2 CaseStudyRS232Datamonitor 57 3.3 CaseStudy00to99minuteprogrammabletimer 65 3.4 CaseStudy4minuteeggtimer 69 4 B/WLiquidCrystalDisplays 77 4.1 IndustrystandardalphanumericalLCDdisplays 78 4.2 CaseStudyASCIIstringgenerator 87 4.3 CaseStudyRS232datamonitor 94 4.4 CaseStudyheartratemonitor-ProgramOXY.ASM 103 4.5 CaseStudyIICrealtimedigitalclock 114 5 GraphicLiquidCrystalDisplays 123 5.1 CaseStudyDensitronLM4068B/W100x64pixeldisplay 123 5.2 CaseStudysimplePDAusingtheNokia3310 129 5.3 Iconimageeditingsoftware 136 5.4 CaseStudyNokia3310GPSdigitalclock 140 5.5 CaseStudyNokia3510iElectroniccompass 155 5.6 CaseStudyNokia6100Epsondisplay8bitcolour 161 5.7 CaseStudyNokia6100Philipsdisplay16bitcolour 165 7 TableofContents 6 OEMcolourGraphicDisplays 168 6.1 OLIMEX 168 6.2 TheMPS430-4619LCD(6100) 169 6.3 4DSYSTEMS 169 6.4 The4D-MICRO-LCD-320-PMD2DISPLAY 171 6.5 Display3000 173 6.6 ezLCD 174 6.7 REACHtech 176 7 Appendix 178 7.1 References 188 Index 191 8 1Lightemittingdiodes 1 Light emitting diodes TheLEDisasimpleindicatoravailableinavarietyofdifferentshapes,coloursandlevels oflightintensity.Itcanbemadetostaypermanentlyon,flashonandoffatdifferentfre- quencies, and vary its light output. To achieve this, an embedded microcontroller – the PICchip–isused,wherebyaprogramcaneasilychangethefunctionalityoftheLED:for useasstatus(ON/OFF)andalarmconditionsand,becauseitisavailableinalargerange ofcolours,itcandifferentiatebetweenthestatusofmanysignalchannels.Alsoitcanbe used to indicate an analogue quantity either by varying its brightness or by altering the rateofflashing.LEDsareusedinmanyportableapplicationsbecauseoftheirlowcurrent consumptionandsotheexamplesinthischapterconcentrateonlowpowerbatteryusage. Inthischapter,anoverviewoftheLEDisgiven,togetherwithitshistoryandcharacteris- tics. To enable the reader to design, construct and program the circuit, a simple ‘walk-through’usingaschematicanddesignpackageisincluded.Inadditionsimplesteps in using the ‘MPLAB’ programming environment to program the PIC are included. Fi- nallyseveralprojectsareincludedtodemonstratetheuseofLEDs. 1.1 History of the light emitting diode Red,GreenandBlueLEDs A light-emitting diode (LED) is a semiconductor device that emits incoherent nar- row-spectrumlightwhenelectricallybiasedintheforwarddirectionofthep-njunction. Thiseffectisaformofelectroluminescence. 9

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.