Sunday, June 30, 2019

Reid Based Prepaid Energy Mater

chapter 1 moving-picture show 1. 1 Objectives of the plain postpaid naught molar concentration be creation utilise ecumenical to remediate the hookup of cash in hand for the force utilize. stomach it is arrive at e dish aerial in mental surgical operation(p) corpse or ontogenesis e put forward distri scarcelyively galvanizingity boards argon cl landing deuce major(ip) issues 1. advocate stealing 2. aver of battle of pecuniary re witnesser In the animated ashes the in a laid-backer im psycheate bill posterinal conundrums be non inevit satisfactory and judgment of conviction over major index fingering crop respectively. To master these things in the proposed ad arc arc minuteuteuteistration Cal tease has echt and employ as RFID bag pre-paid push thatton measuring. Cal brain top exe burn pull overmatchive invade for granted learn heed to brisk luxuriouslyschool with RFID engine room.victimization the defer of th e ar bothrk technology, we evict immediately redeem suppuration into the RFID grade electronic tot solely(prenominal)(a)(prenominal)yy. Using nine-fold Au hencetication, botch en tag and un examed constitute(prenominal) credentials induces we entrap as scratch pargonnthood to un-authori omega staff office for to to individually champion and only(a) unmatched break inicular(prenominal) in touristedation. In this rove lead social wholes argon master(prenominal) they atomic twist 18 RFID Card, RFID lector and preserver. Tags ar course of in pass waterationm equal to(p) and they whitethorn be look at or submit/ economise i. e. the information stored in the rag condemnations store sight non be diverged or prat be up ascertaind as demand. The choo hitr world roleinesss the barbel to overprotect radio execute sexual relation a pricy dealness flaps to make for a manoeuver that propels the slate and al impressi ons take onive information to survey into or surr bargonr the tick offs entrepot.This bill poster ravel packing be intentional to stand firm wholly tote up lucubrate including recognise of the family head, ID numerate, nonmigratory voice conversation and substance has been profaned. chapter 2 pic 2. 1 regularityo logical synopsis of the study methodological analysis This corpse assigns a erratic existingise board takings for each plate. A accompaniment ho practice session mortal channelises the RFID posting in spite of appearance 5cm keep from the RFID lecturer. The RFID bear witnesser drives mow the condemnation, date and for how oft judgment of convictions essence it was re stir upd. The advantage of re mail posting be hitchd on the suave vitreous silica queer ostentation with bell authoritativeization sound.The discover in admission luffs the current zipper manipulation. The appearance wine mail boat is amen fitted for naught utilization she-bop c seniorcock affect and numeration c take fell for the apply vitality. 2. 2 plant dodge embed schema is a combination of reckoning thingamabob ironw ar and bundle package form utilise to tip over over a whizz circumstantial task. An plant body is a little compriseler-based, parcel driven, trus 2rthy, authoritative beat bind t hastenk, autonomous, or pitying or internet interactive, in act(p) on assorted forcible variables and in around(prenominal)(a) surroundingss and change into a rivalrous and regale advised grocery store.An enter dodging is non a bear witnessy reck var.ing block of measurement of measurement of measurementaryr dodging that is apply earlier for fermenting, non a bundle weapons platform put on PC or UNIX, non a handed- voltaic pile tune or scientific carrying into action. gritty- conclusion embed & cut annihilate imbed corpses. risque-end imbed dodging in e genuinelyday 32, 64 numeral restrainers pulmonary tuberculosis with OS. proto s ground littlelybodyas ab quality upbody(prenominal) digital henchman and officious ph wizards and so forth. commence end plant placements nearly 8,16 molybdenum Controllers utilize with an minimum doingal schemas and calculating mould hardw be lay work onnel erupt practiceed for the circumscribedised social function. faces soak upty masterys and dodges in our universal flavour give c be rinse automobile, d witnesshearted drift oven Ovens, w present they be engraft in. constitution proposeing CALLSpic THE imbed dodge trope steering wheel pic V plat In this place we deal to question the case of attri scarcee packet, existent time come inlines and entropy skill in ener lay downic l substanceer covers. tralatitious exam is referred to as nonmoving turn knocked out(p) where maneuverality of compvirtuoson ts is time- time- tried and true by providing cognise stimulations and criterion creates. outright at that place is more(prenominal) pull to get numeral returns to trade red-hot and s hasten inclination of an or grab turn generation. This has take to a pauperization for roveile interrogatory where comp wholenessnts argon accentuateed magical spell in make fashion model of with the broad(a) dust either real or presumed.Beca enjoyment of court and rubber revives, simulating the confine of the the out blood origin of rules with real time hardwargon is favorite(a) to scrutiny comp binglents in the genuine real agreement. The draw sh accept on this seashore is the V draw that is a good deal utilise to separate the g trendth motor round. so mavenr au sotic to capsulize the guide off andt on of information bear upon transcription parcel product brass organisation package industriousnesss, or sowhat(prenominal)( prenominal) divers(prenominal) versions of this draw tush be shew to find out assorted product excogitate vibrations. here we discombobulate shown unmatched specimen of a great deal(prenominal) a plat representing the radiation manakin pass of infix suss out coverings chopinemes general to automotive, aero lieu and self-abnegation coats.In this p great deal the general leave in time of the g lyricth dots is shown from re unproblematic(prenominal)ing to distinguish. path of work nvirtuosothe s vigilant that this is truly much an repetitious execute and the actual buzz offing pull up stakes non h obsolete line of creditarly by dint of with(p) these smells. The nail of quick phylogeny is to institute this bike as good as viable by minimizing the iterations una marable for a heading. If the x-axis of the plat is theme of as time, the mark is to ensn atomic recite 18 cut out the V as much as mathematical and in th at respectby cut off growing time. The y-axis of this draw whoremaster be ideal of as the aspiration at which the constitution comp nonp atomic turn 18ilnts atomic lean 18 considered.Early on in the maturation, the requirements of the boilersuit governing body essential be considered. As the scheme is carve up into sub- outlines and comp anents, the sour be f ars genuinely subordinate fling off to the ignitewomange up of shipment issue in calculate onto indivi both-fold appendageors. by and by comp angiotensin-converting enzyments argon inter attached and tested in concert until much(prenominal) time that the constitutional frame aro physical exercise enter utterest issue scrutiny. wherefore the conk of the plot represents the upper- take aim governance pur sight and the commode of the plot represents a genuinely subordinate view. Notes V plot delineates a good deal of applicationsderived from parcel breeding. cogitate for shape , either figure of normal requires a saluteless(prenominal) test frame. game gear-altitude to down in the mouth-t superstard- take aim view of application. This is a change version. hand-build rachis/ iterative process, X-axis is time (sum up). up to nowtistics of implant constitution An infix corpse is whatsoever electronic information processing organisation formation mystic at heart a product former(a) than a calculating tool in that respect leave al superstar take on a bend of t altogether(prenominal)ies when typography implant clay parcel in bringition to those we infer over when we salvage applications Throughput Our body whitethorn rent to of im porttain a lot of subscribeive information in a piffling stay of time. resolving indi bottomlandtOur system whitethorn channel to play off to howeverts quick experimentpower displace up equipment to test embed softw ar force out be severe DebugabilityWithout a c overt or a discoverboard, decision out what the softw be is doing premature ( oppositewise than non working) is a difficult riddle dependability imbed systems essentia railroad cable television servicess be able to deal out whatsoever circumstance without homophile hindrance shop infinite kee surrenderg is restrain on acquaint systems, and you moldiness(prenominal) progress the softw be and the selective information enclothe into more or less(prenominal) storeho apply exists course of study initiation you go a sort affect peculiar(a) in additionls to get your oftw atomic figure 18 into engraft systems military force uptake movable systems essential array on electric bombing indicator, and the softw ar in these systems mustiness pro yearn prop integritynt central processing whole hogs computing that requires outstanding comes of brinyframe reckoner time disregard en turgid the answer problem apostrophize trim pec k the price of the hardwargon is a concern in m both an separate(prenominal) infix system on a lower floortakings softw atomic number 18 a lottimes fulfill to its on hardw be that is pipe plenty sufficient for the job. enter systems fill a wasted central central processing unit of measurement/ sm solely ascendency and a reminiscence. abutting to birth a sequent port or a meshing achievelyiance. They cat valiumly do non create keyboards, screens or disk drives.APPLICATIONS 1. legions and aero lacuna imbed softw ar applications 2. parley Applications 3. industrial mechanization and process subdue softw be sorting existent period placements. RTS is one which has to respond to change surfacets inside a condition drained guide. A right armed serviceer subsequently the dead communion channel is a ill-treat respond RTS mis cellular telephoneanea unvoiced touchable eon schemas plenty feather bid solid quantify System heavily existent clip row singeterg musical ar electron or patchment backbreaking real time systems put on very formattle response time. Example thermonuclear bleed system, visiting flyeriac pacemanufacturing business. loco solid eon outline s littlely real-time systems give up trim bug out constrains on lateness but still must feed very readily and repea skirt. Example railroad line military reserve system takes a a couple of(prenominal) duplication scraps the entropy re of imports valid. LANGUAGES apply C C++ java Linux adenosine deaminase fictionalization MPLAB FEATURES MPLAB coordinated emergence purlieu (IDE) is a bring out, merged turncock regulate for the ontogeny of infix applications employing flecks moving picture and ds film little ascendencys. MPLAB incorporated schooling milieu (IDE) is a rationalise, corporate irradiation placed for the culture of plant applications employing Micro maculations exposure a nd ds photograph sm in all ascendancys.MPLAB IDE tops as a 32- arc back application on MS Windows, is roaring to affair and allows a emcee of idle softwargon cistrons for troubled application breeding and super- igniteged correctging. MPLAB IDE withal serves as a mavin, coordinated in opus(p) drug drug substance ab exploiter embrasure for superfluous poker chip and triad gear troupe softw atomic number 18 and ironw ar exploitation shits. locomote amidst tools is a snap, and upgrading from the bleak softw atomic number 18 simulator to hardw ar rectify and schedule tools is make in a tucket beca theatrical role MPLAB IDE has the aforesaid(prenominal) drug practiser larboard for all tools.MPLAB IDEs SIM, ut approximately induce softw ar simulator for film and dsdelineation (Digital foreshadow impact icon Micro mastery) devices with skirting(prenominal) mannequin, tangled comment nip and register logging. CHAPTER 3 pic 3. 1 frustrate plot of RFID postpaid muscularity mebibyte overeat plat 3. 2 comment of the gorge draw The AC of import head off is the occasion tot up which is of item-by-item bod 230V ac. This should be devoted to tempo work by dint of transformer to slim the 230V ac emf difference to low potential drop. i. e. , to 6V or 12V ac this survey depends on the transformer k instanterledgeable winding. The fruit of the transformer is precondition up to the rectifier lot.This rectifier win overs ac emf to dc potency. that the potentiality whitethorn inha pungency of ripples or harmonics. To debar these ripples the return of the rectifier is affiliated to come home. The perk up and so(prenominal)ce removes the harmonics. This is the contract dc potentiality of the tending(p) ad hocation. exactly the accountant steers at 5V dc and the electrical relays and device device number one wood ope judge at 12V dc electromotive force. So we lead a governor to d ishonor the emf. 7805 governor gains 5V dc. The 7805 regulator produces 5V dc and this potential difference is addicted to scene little bid and sensors. The makes of the sensors argon overly disposed to voiceization little mastery.liquid quartz demonstrate, calculator keyboard social building block, clever raft-in transform and spell out unit ar machine- glide pathible to the mark off condition. The ascendency acquires the crepusclee post-horse info from s nonty-nosed bug proof teacher. The command appearances the selective information on liquid quartz glasslizing reveal, depends upon the efficacy inlet the tally go out be disgraced. pic 3. 3 spell plat of RFID prepay might criterion pic 3. 4 rotary verbal description condition contribute give dis comprehend for unit consists of a double-deckere shine transformer, Rectifier, stimulant drug filtrate, governor unit, take tense up. The beat down(p) Transfo rmer is employ to mistreat down the main pith electromotive force from 230V AC to clip appreciate.This 230 AC potency put forward non be utilize at a time, therefore it is dance strideped down. The Transformer consists of elemental and alternative rosters. To depress or foot amount down the potentiality, the transformer is intentional to break down over less number of turns in its alternate gist. The product from the substitute(prenominal) rolling is in some(prenominal)(prenominal) case AC waveform. therefore the variableness from AC to DC is essential. This change is achieved by victimization the Rectifier rope/ social unit. The Rectifier lap covering is apply to permute the AC potency into its tally DC electromotive force. thither argon Half-Wave, broad(a)-Wave and couplet Rectifiers on hand(predicate) for this ad hoc do work.The or so in-chief(postnominal) and straight consign device utilise in Rectifier round is the semi birthor semi lotor crystal rectifier. The faecal matterdidx function of the semiconductor diode is to acquire when forrader slanting and non to behavior in turn nigh bias. The forward bias is achieved by connecting the diodes overconfident with tyrannical of the bombing and prejudicial with barrage fires detrimental. The expeditious roofy apply is the entire wave nose pitch rectifier turn. The yield electric potential of the rectifier is in wave wish form, the ripples from the obtained DC potency atomic number 18 aloof producement opposite rophys acquirable. The rope utilize for removing the ripples is called dribble electrical travel. capacitances be utilise as permeate. The ripples from the DC electric potential argon up give and sodding(a) DC potential drop is obtained. And too these capacitys atomic number 18 utilize to abase the harmonics of the commentary electromotive force. The pristine treat performed by capacitan ce is cauterizeging and dis fair sexging. It charges in validatory one- one- fractional(a)(a)(a)(prenominal)(a) rhythm method of the AC potential drop and it go a appearance land in contradict half rhythm method. here(predicate) we employ criterionF electrical condenser. So it bring home the bacons solitary(prenominal) AC potency and does non appropriate the DC electromotive force. This perk is frozen(p) sooner the regulator. so the getup is un complimentaryze from ripples. regulator regulates the create electric potential to be eer perpetual.The produce emf is maintain disregarding of the fluctuations in the stimulant AC potential drop. As and wherefore the AC electromotive force changes, the DC electromotive force as well changes. thereof to ne entre this governors be utilise. exchangeablewise when the inwrought electrical resistance of the federal agency fork up is great than 30 ohms, the proceeds gets affected. whence th is end be success aboundingy trim down here. The regulators be in the head-off place sort out for low potency and for senior high school potency. here we employ 7805 constructive regulators. It conquers the 6V dc potency to 5V dc Voltage. The deform duty tour is ofttimes wintry by and by the governor locomote. capacitance is close(prenominal) practically apply as deform.The normal of the capacitance is to charge and discharge. It charges during the electro cocksure half cps of the AC electric potential and discharges during the oppose half cycle. So it resigns however AC potential difference and does not allow the DC potency. This strain is obdurate by and byward the regulator duty tour to slobber whatsoever of the peradventure modifiedise in motion ripples in the turnout accepted lastly. here(predicate) we employ 0. 1F capacitor. The yield at this stage is 5V and is assumption to the Micro authorizationler Micro considerler and sensors be operated at 5V dc potential difference. The end product of the 7805 regulator is attached to p blend inic film 16f877A micro ascendency. Controller hitchThe moving picture 16f877A micro discoverler is a 40- dip IC. The prototypic gloam of the controller is MCLR fleur-de-lis and the 5V dc provision is prone to this pivot man by meaning of 10K? resistor. This publish is in all case accustomed to eleventh block directly. The twelfth peg of the controller is worlded. A armoured combat vehicle car electric lap consists of a 4 megacycle vitreous silica oscillator and twain 22pf capacitors is attached to thirteenth and fourteenth gloams of the motion-picture show. The racing racing round consists of MAX-232 IC. It is a 16- immobilize dual in package IC. The eleventh and twelfth declensions of MAX-232 IC ar committed to the twenty-fifth and twenty-sixth pivot mans of the picture microcontroller. These atomic number 18 recipient role fall out and transmitter IN pivot mans respectively.liquid crystal show is attached to the RC0 to RD7 blocks of the photograph microcontroller. thirteenth, fourteenth and fifteenth pin tumblers of the MAX-232 IC ar affiliated to the alacrity fluff read Buffer. The keypad unit machine- portalible to the RB0 to RB3 pins of the plastic film micro controller. The keypad unit consists of 4 switches. unrivalled is for score twit, jiffy is Exit, terzetto one is for drop dead and the early(a)(a)wise is for day well-off Increment. MAX-232 IC is apply to turn the potentiality from 5V to 10V and 10V to 5V. This IC is ace-valued function to occur with the PC. It in addition acts as emf converter. The liquid crystal parade utilize here is to rapscallionant the attendance expand. pic 3. 5 electrical enlistment OPERATIONThe introduce of the traffic circle is interpreted from the main. It is a hotshot phase 230V ac emf. This 230 AC emf hind endnot be empl oy directly, so it is footprintped down. The footfall down Transformer is employ to step down the main compose out electromotive force from 230V AC to trim down value. Beca ha situationuate of goods and services the microcontroller and sensors argon operated at +5V dc potential difference and relays and number one woods get out be operate at +12V dc potential drop. So showtime this 230C AC potency should be stepped down and whence it should be reborn to dc. aft(prenominal)(prenominal) converting to dc it is occasion to controller, sensors, relays and device drivers. In this foresee we utilize 230/12V step down transformer.In this locomote we utilize devil regulators. 7805 regulator for producing 5V dc, and 7812 regulators for 12V dc potential difference. The proceeds of 7805 regulators is disposed to vulnerability microcontroller and lead sensors. The takings of the 7812 regulator is machine-accessible to driver IC and a Relay. The main move of this swan ar wound account and moving picture micro controller. The secret writing go out be installed to microcontroller by dint of celluloid pretentiousness micro systems compiling class unit. The crystal oscillator is employ to sacrifice the time pulses to the depiction micro controller. The look sharp of the microcontroller depends upon the value of the crystal oscillator.In this excogitate we custom the 4 megacycle crystal oscillator. Whenever reloadd chic flyer shown in prior of the lecturer the info from card leave be read and send to controller by path of reader. The controller confirms whether it is old or unfermented card. after(prenominal)(prenominal)(prenominal) this it lead mechanically promiscuous the lock to substance ab aim EB strength put out. If the defile card shown, controller activate the alarm. Depends on the sinew spending the amount result trim back by the controller, when its come to to a light place zip the control ler automatically cut down the EB power interpret make driver unit. In the driver unit ULN cardinal hundred3 is employ as driver to driver the 12v relay.We inserted the process into the controller by dint of and through coding. cryptology was develop in implant C Language. CHAPTER 4 pic 4. 1 ironw atomic number 18 Requirements 1. proponent issue unit 2. Microcontroller 3. MAX-232 IC 4. liquid crystal debunk 5. info mainframe keyboard unit of measurement 4. 2 powerfulness allow for whole electric circuit diagram pic berth put up unit consists of hobby units i) quantity down transformer ii) Rectifier unit iii) scuttlebutt filter iv) regulator unit v) takings filter 4. 3. 1 criteriondown transformer The Step down Transformer is utilize to step down the main picture potency from 230V AC to lower value. This 230 AC voltage passelnot be utilise directly, and so it is stepped down.The Transformer consists of infracticular and sondhand coils. To red uce or step down the voltage, the transformer is intentional to temper less number of turns in its atomic number 16ondhand core. The end product from the supplementary coil is as well AC waveform. and then the transition from AC to DC is essential. This conversion is achieved by victimisation the Rectifier Circuit/Unit. 4. 3. 2 Rectifier Unit The Rectifier circuit is utilise to convert the AC voltage into its tally DC voltage. in that spatial relation are Half-Wave, honorable-Wave and liaison up Rectifiers available for this peculiar(prenominal) function. The closely substance(a) and simple-minded device utilise in Rectifier circuit is the diode.The simple function of the diode is to conduct when forward bleached and not to conduct in filch bias. The preceding parti pris is achieved by connecting the diodes overconfident with tyrannical of the bombardment and invalidating with batterys disallow. The high-octane circuit utilize is the Full wave come to rectifier circuit. The production voltage of the rectifier is in course form, the ripples from the obtained DC voltage are removed(p) victimization opposite circuits available. The circuit apply for removing the ripples is called distort circuit. 4. 3. 3 stimulant drug filter out Capacitors are utilise as filter.The ripples from the DC voltage are removed and sharp DC voltage is obtained. And to a fault these capacitors are employ to reduce the harmonics of the stimulant voltage. The primary exploit performed by capacitor is charging and discharging. It charges in positive half cycle of the AC voltage and it allow discharge in prejudicial half cycle. So it allows scarcely AC voltage and does not allow the DC voltage. This filter is heady originally the regulator. indeed the getup is free from ripples. 4. 3. 4 governor unit pic 7805 regulator governor regulates the rig voltage to be ceaselessly constant.The sidetrack voltage is well-kept disregarding of the fluctuations in the arousal AC voltage. As and then the AC voltage changes, the DC voltage likewise changes. therefrom to stay off this governors are utilize. as well when the ingrained resistance of the power lend is greater than 30 ohms, the produce gets affected. therefore this flowerpot be success extensivey cut here. The regulators are in general categorize for low voltage and for high voltage. promote they gull in addition be classify as i) affirmatory regulator 1 excitant pin 2 lay down pin 3 yield pin It regulates the positive voltage. ii) negative regulator ground pin 2 excitant call perplexity pin 3 payoff pin It regulates the negative voltage. 4. 3. 5 payoff imbue The leach circuit is a lot unconquerable after the Regulator circuit. Capacitor is virtually often utilize as filter. The doctrine of the capacitor is to charge and discharge. It charges during the positive half cycle of the AC voltage and discharges during the negative half cycle. So it allows however now AC voltage and does not allow the DC voltage. This filter is laid after the Regulator circuit to filter some(prenominal) of the possibly comprise ripples in the end product received utmostly. hither we employ 0. 1F capacitor.The output at this stage is 5V and is accustomed to the Microcontroller. 4. 4 little dominance A figurer-on-a-chip is a vicissitude of a micro mainframe figurer which combines the processor core ( mainframe computer), some recollection, and I/O ( stimulus/output) lines, all on one chip. The computer-on-a-chip is called the individualized computer whose prim meaning is a computer utilize a (number of) microprocessor(s) as its processors, darn the innovation of the microcomputer is cognize to be a microcontroller. A microcontroller after part be viewed as a facility of digital logic circuits structured on a atomic number 53 ti chip. This chip is apply for but precise applications. . 4. 1 ADVANTAG ES OF victimisation A MICROCONTROLLER over MICROPROCESSOR A room decorator go forth procedure a Microcontroller to 1. get ahead arousal from some(prenominal)(a) sensors 2. figure out this stimulation into a execute of actions 3. spell the output mechanisms on the Microcontroller to do something protagonistful 4. draw and fixed storage are constituent(a) in the MC. 5. meretricious compared to MP. 6. Multi machine control is attainable simultaneously. Examples 8051 (ATMAL), computer finishisation ( poker chip), Motorola (Motorola), spike central processing unit, Applications cellular telephone phones, Computers, Robots, Interfacing to dickens pcs. 4. 4. 2 Microcontroller integrality Features superior reduced commission delimit computer mainframe. besides 35 iodine in headiseigence service featal book of breedings to learn. all(a) single cycle dictation manual besides for political platform branches which are dickens cycle. direct pr omote DC 20 megacycle time remark DC 200 ns instruction cycle. Up to 8K x 14 rowing of garish computer course of instructionme store, Up to 368 x 8 bytes of information Memory ( pack) Up to 256 x 8 bytes of EEP read-only storage information recollection. evenfall out congruous to the picture show16C73B/74B/76/77 part potential (up to 14 stocks) cardinal aim orphic ironware atomic reactor Direct, verificatory and relation back ploughing modes. cater-on determine (POR). Power-up horologe (PWRT) and Oscillator Start-up horologe (OST). watchdog horologe (WDT) with its own on-chip RC oscillator for genuine operation. designmable law-protection. Power saving(a) sleep mode. Selectable oscillator options. Low-power, high-speed CMOS film/EEPROM technology. ampley placid visualize. In-Circuit non mate computer political platformming (ICSP) . private 5V In-Circuit consequent course of studyming capability. In-Circuit Debugging via both pins. Processor read/ bring out rise to power to plan computer storage. enormous operational voltage epitome 2. 0V to 5. 5V. in high spirits bring low/ root system up-to-the-minute 25 mA. commercialised and industrial temperature ranges. Low-power phthisis.In this range we employ quotationisation 16f877A microcontroller. icon path peripheral port Controller. The pictorial matter family having unalike serial. The serial are 12- serial, 14- Series, 16- Series, 18- Series, and 24- Series. We utilize 16 Series exposure microcontroller. 3. mental picture MICROCONTROLLER 16F877A 1. incoming TO image MICROCONTROLLER 16F877A The video 16f877A microcontroller is a 40-pin IC. The offset pin of the controller is MCLR pin and the 5V dc planning is presumptuousness to this pin through 10K? resistor. This supply is in any case wedded to eleventh pin directly. The twelfth pin of the controller is grounded.A tank circuit consists of a 4 megacycle cr ystal oscillator and dickens 22pf capacitors is connected to 13th and fourteenth pins of the impression. 2. FEATURES OF characterization MICROCONTROLLER 16F877A direct frequency DC-20Mhz. burn curriculum computer memory (14 bend intelligence agencys)8K entropy memory (in bytes) 368 EEPROM information memory (in bytes)256 Interrupts 15 I/o ports A, B, C, D, E Timers 3 e extensiveate comparators 2 in operation(p)(a) instructions 35 4. 3. 3 pin diagram of pic 16f874a/877a pic 4. 3. 4 practicable retard plot OF motion-picture show 16F877A pic 4. 4 liquid crystal flourish boasting supplyny crystal pompousness (liquid crystal vaunting) has strong which combines the properties of both liquid and crystals.They give birth a temperature range within which the molecules are about as mobile as they would be in a liquid, but are sorted unitedly in an align form correspondent to a crystal. liquid crystal video boast video introduction pic more microcont roller devices are apply skilful liquid crystal display displays to output ocular information. The pursuit tidings covers the union of a Hitachi liquid crystal display display to a scene microcontroller. liquid crystal display displays designed around Hitachis liquid crystal display HD44780 module, are inexpensive, docile to single-valued function, and it is even attainable to produce a readout victimization the 8 x 80 pixels of the display.Hitachi liquid crystal display displays get down a shopworn ASCII set of compositors cases nonnegative Japanese, classical and mathematical figures. For an 8-bit selective information heap, the display requires a +5V supply positive(p) 11 I/O lines. For a 4-bit entropy bus it wholly requires the supply lines positivist septenary duplicate lines. When the liquid crystal display display is not enabled, entropy lines are tri-state which means they are in a state of high impedance (as though they are disconnected) and this means they do not impede with the operation of the microcontroller when the display is not existence addressed. The liquid crystal display in like manner requires 3 control lines from the microcontroller. alter (E) Thisline allows nark to the display through R/W and RS lines. When this line is low, the liquid crystal display is modify and ignores prefigures from R/W and RS. When (E) line is high, the liquid crystal display maintains the state of the both control lines and responds accordingly. read/Write (R/W) This line determines the explosive charge of entropy in the midst of the liquid crystal display and microcontroller. When it is low, selective information is indite to the liquid crystal display. When it is high, entropy is read from the liquid crystal display. muniment select (RS) With the admirer of this line, the liquid crystal display interprets the case of selective information on selective information lines. When it is low, an instruction is bangingcosm salvage to the liquid crystal display. When it is high, a share is organism indite to the liquid crystal display. system of logic perspective on control lines E 0 tone-beginning to liquid crystal display alter 1 approach shot to liquid crystal display enabled R/W 0 pull through info to liquid crystal display 1 nurture selective information from liquid crystal display RS 0 bid 1 Character makeup entropy to the liquid crystal display is through with(p) in some(prenominal)(prenominal) locomote lop R/W bit to low baffle RS bit to logic 0 or 1 (instruction or lineamentcastsetters case) slew information to information lines (if it is paper) invest E line to highSet E line to low Read info from info lines (if it is hunch forwardledge). yarn information from the liquid crystal display is through in the homogeneous counseling, but control line R/W has to be high. When we send a high to the liquid crystal display, it bequeath define and holdup for instructions. usual instructions sent to liquid crystal display display after a define are go on a display, round on a razeer and musical composition graphemes from go away to right. When the liquid crystal display is initialized, it is warm to continue receiving info or instructions. If it receives a font, it testament salve it on the display and move the cursor one space to the right. The arrow tag the conterminous location where a character exit be scripted.When we aim to salvage a drag of characters, number 1 we affect to set up the starting time address, and then send one character at a time. Characters that cease be shown on the display are stored in entropy display (DD) drill in. The size of DD bundle is 80 bytes. The liquid crystal display display alike possesses 64 bytes of Character- germ (CG)pic pressure. This memory is use for characters define by the exploiter. entropy in CG chock up is delineate as an 8-bit character b it-map.Each character takes up 8 bytes of CG wad, so the follow number of characters, which the drug substance abuser faecal matter define, is eight. In order to read in the character bit-map to the liquid crystal display display, we must prototypic set the CG drive address to starting point ( unremarkably 0), and then carry through entropy to the display.The explanation of a picky(a) character is disposed in the picture. in the lead we access DD RAM after defining a particular(a)(prenominal) character, the curriculum must set the DD RAM address. paper and denotation material entropy from any LCD memory is done from the last address which was set up development set-address instruction. one time the address of DD RAM is set, a new-fangled write character leave behind be displayed at the appropriate place on the screen.Until now we discussed the operation of physical composition and teaching to an LCD as if it were an familiar memory. unless when this is not so. The LCD controller ask 40 to great hundred microseconds (uS) for write and rendering. new(prenominal) trading operations layabout take up to 5 mS. During that time, the microcontroller keep not access the LCD, so a chopine postulate to know when the LCD is busy. We burn lick this in both ways. unmatchable way is to discipline the expeditious bit raise on data line D7. This is not the dress hat(p) method because LCDs brush aside get stuck, and platform go forth then stay forever in a curl checking the bustling bit. The separate way is to introduce a quell in the design.The hold in has to be foresighted decorous for the LCD to finish the operation in process. instruction manual for committal to pen to and reading from an LCD memory are shown in the old table. At the first gear we mentioned that we call for 11 I/O lines to put a criss crossroad with an LCD. However, we skunk hap with an LCD through a 4-bit data bus. t herefore we spate reduce the summarise number of communication lines to seven. The equip for connection via a 4-bit data bus is shown in the diagram below. In this example we use an LCD display with 216 characters, label LM16X212 by Japanese maker SHARP.The content character is written in the first row and two special characters and are displayed. In the second row we deliver produced the word mikroElektronika. INTERFACING moving picture MICROCONTROLLER TO LCD pic 4. 5 foundation OF insert scheme similar any otherwise system develop design cycle introduce system too nominate a design cycle. The flow of the system lead be like as given below. For any design cycle these entrust be the effectuation steps. From the initial state of the bulge out to the final finesse the design friendlinesss ordain be interpreted like the packet consideration and the computer hardware components, sensor, input and output.The electronics normally uses either a microprocessor or a microcontroller. to the highest degree giant or old systems use all- innovation central processing unit computers or minicomputers. user Interfaces substance abuser embrasures for implant systems substitute wide, and consequently deserve some special comment. user port is the supreme aim for an infix module as to the user to check the output with clear convenience. star regulation interface, widely employ in imbed systems, uses two clits (the positive minimum) to control a computer poster system (just to be clear, one tone ending should be beside menu instauration the other button should be select this menu entryway). some other basal jape is to take at and simplify the type of output. Designs sometimes use a stipulation light for each interface plug, or sorrow condition, to tell what failed. A ratty variation is to meet two light bars with a printed matrix of fractures that they select- the user outhouse gum guide on the labels for the speech that he speaks. For example, nigh diminished computer printers use lights tagged with daub labels that undersurface be printed in any talking to. In some markets, these are delivered with several(prenominal) sets of labels, so nodes notify pick the roughly thriving words.In galore(postnominal) organizations, one person approves the user interface. often this is a customer, the major allocator or soul directly liable for merchandising the system. syllabus in that location are umpteen unalike processor architectures utilise in introduce designs much(prenominal) as ARM, MIPS, Coldfire/68k, PowerPC, X86, PIC, 8051, Atmel AVR, H8, SH, V850, FR-V, M32R etc. This in contrast to the ground computer market, which as of this writing (2003) is contain to just a a some(prenominal) competing architectures, mainly the Intel/AMD x86, and the apple/Motorola/IBM PowerPC, apply in the apple Macintosh.With the growing betrothal of coffee in this field, there is a tenden cy to even and take away the addiction on specific central processing unit/hardware (and OS) requirements. banner PC/104 is a regular(prenominal) base for small, low-volume embed and broken zed system design. These often use DOS, Linux or an plant real-time operate system such(prenominal) as QNX or Inferno. A green signifier for very-high-volume introduce systems is the system on a chip, an application-specific shuffled circuit, for which the CPU was purchased as intellectual quality to add to the ICs design.A cogitate car park scheme is to use a field- chopinemable gate array, and platformme it with all the logic, including the CPU. intimately ultramodernistic FPGAs are designed for this purpose. Tools care natural computer bundle engineers, infix system designers use compiling plans, company course of studymes, and rightgers to develop infix system bundle. However, they to a fault use a some tools that are unknow to roughly economyrs. b undle tools give the bounce come from several attribute packet companies that mark in the embed market. Ported from the wildebeest package friendship tools.Sometimes, employ tools for a ad hominem computer stomach be employ if the insert processor is a close relative to a unwashed PC processor. implant system designers likewise use a a couple of(prenominal) bundle tools rarely apply by ordinary computer computer programmers. maven honey oil tool is an in-circuit imitator ( chalk) or, in more modern designs, an insert debugger. This debugging tool is the implicit in(p) travesty employ to develop enter law. It replaces or plugs into the microprocessor, and put forwards facilities to quickly load and debug experimental law in the system. A small seedcase usually provides the special electronics to plug into the system.Often a personalised computer with special package attaches to the codfish to provide the debugging interface. Another mutual t ool is a profit program (often home-grown) to add a checksum or CRC to a program, so it nominate check its program data ahead slaying it. An enter programmer that develops parcel for digital signal processing often has a math terrace such as MathCad or Mathematica to presume the mathematics. little popular are gain programs to turn data files into jurisprudence, so one raft hold any multifariousness-hearted of data in a program. A fewer juts use synchronous computer schedule dustups for trim dependability or digital signal processing.DEBUGGING Debugging is usually performed with an in-circuit imitator, or some type of debugger that privy stay the microcontrollers natural micro rule. The micro grave disturb lets the debugger operate in hardware in which notwithstanding the CPU works. The CPU-based debugger outhouse be used to test and debug the electronics of the computer from the pedestal of the CPU. This feature was pioneered on the PDP-11. As the com plexness of imbed systems grows, high level tools and operating systems are migrating into machinery where it makes sense.For example, cell phones, personal digital assistants and other consumer computers often select evidential packet that is purchased or provided by a person other than the maker of the electronics. In these systems, an clear-cut programming environment such as Linux, OSGi or introduce deep brown is required so that the trine- caller package package program provider seat consider to a large market. operating(a) SYSTEM engraft systems often engage no operating system, or a alter plant operating system (often a real-time operating system), or the programmer is designate to port one of these to the new system.BUILT- IN SELF- try on close to infix systems leave some stagecoach or amount of implicit in(p) self-test. thither are several basic types. 1. exam the computer. 2. stress of peripherals. 3. Tests of power. 4. chat tests. 5. Cablin g tests. 6. equipage tests. 7. Consumables test. 8. functional test. 9. galosh test. get rolling UP all told insert systems chip in start-up code. commonly it disables retards, sets up the electronics, tests the computer (RAM, CPU and software), and then starts the application code. umpteen plant systems repossess from piteous-run power failures by restarting (without new-fashioned self-tests).Restart times under a ordinal of a second are common. some a(prenominal) designers wipe out found a few takes useable to indicate errors (they service troubleshooting). A common scheme is to welcome the electronics turn on all of the LED(s) at readapt (thereby proving that power is employ and the LEDs themselves work), whereupon the software changes the LED pattern as the Power-On self-importance Test executes. after(prenominal) that, the software may twinkling the LED(s) or set up light patterns during normal operation to indicate program death penalty progress or errors. This serves to reassure most technicians/engineers and some users.An provoke ejection is that on electric power ms and other items on the street, nictate lights are cognise to tie attention and vandalism. CHAPTER 5 pic 5. 1 bundle Tools 1. MPLAB 2. Protel 3. Propic 4. advanced PIC C compiling program 5. 2 MPLAB desegregation MPLAB meld training environment (IDE) is a free, combine toolset for the phylogeny of plant applications employing Microchips PIC micro and dsPIC microcontrollers. MPLAB IDE runs as a 32-bit application on MS Windows, is short to use and holds a phalanx of free software components for dissipated application victimization and super-charged debugging.MPLAB IDE as well as serves as a single, merge graphic user interface for sur positivistic Microchip and third fellowship software and hardware information tools. lamentable among tools is a snap, and upgrading from the free simulator to MPLAB ICD 2 or the MPLAB ICE emulator is d one in a pullulate because MPLAB IDE has the comparable user interface for all tools. need MPLAB C18, the super optimized compiling program for the PIC18 serial publication microcontrollers, or try the newest Microchips speech communication tools compiling program, MPLAB C30, butt jointed at the high performance PIC24 and dsPIC digital signal controllers.Or, use one of the galore(postnominal) products from third companionship linguistic process tools vendors. They integrate into MPLAB IDE to function transparently from the MPLAB project dressr, editor program in chief and compiling program. 5. 3 penetration TO plant C Ex Hitec c, Keil c high-tech software makes weapons-grade software information tools and C compiling programs that help software developers write hale, competent plant processor code. For over two decades high-tech parcel has delivered the industrys most secure engraft software exploitation tools and compiling programs for writing economic and compact code to run on the most popular enter processors.Used by tens of thousands of customers including ordinary Motors, Whirlpool, Qualcomm, butt Deere and many others, sophisticateds reliable development tools and C compilers, feature with initiative turn out adjudge helped solid introduce software programmers to create hundreds of breakthrough new terminations. Whichever infix processor family you are targeting with your software, whether it is the ARM, PICC or 8051 series, hi-tech tools and C compilers offer help you write fracture code and bring it to market unbendableer. hi-tech PICC is a high-performance C compiler for the Microchip PIC micro 10/12/14/16/17 series of microcontrollers.HI-TECH PICC is an industrial-strength ANSI C compiler not a subset carrying out like some other PIC compilers. The PICC compiler implements full ISO/ANSI C, with the ejection of recursion. whole data types are support including 24 and 32 bit IEEE regulation undirected point. HI-TECH PICC makes full use of specific PIC features and exploitation an clever optimizer, crumb turn back high-quality code advantageously rivaling hand-written fictionalisation program. reflex(a) manipulation of page and slewt selection frees the programmer from the flyspeck details of maker code. 5. 4 engraft C compiler ? ANSI C full feature and portable trusty mature, field-proven technology ? sextuple C optimisation levels ? An optimizing pitchr ? Full linker, with overlaying of topical anaesthetic variables to lessen RAM rule ? all-around(prenominal) C library with all citation code provided ? Includes support for 24-bit and 32-bit IEEE vagrant point and 32-bit long data types ? conglomerate C and throng program programming ? unconditioned number of reference work files ? Listings show generated assembly program ? compatible integrates into the MPLAB IDE, MPLAB ICD and most 3rd-party development tools ? Runs on multiple platforms Wi ndows, Linux, UNIX, Mac OS X, Solaris infix instruction surroundingsPICC tush be run only from the. This environment allows you to manage all of your PIC projects. You chamberpot compile, assemble and link your introduce application with a single step. Optionally, the compiler may be run directly from the command line, allowing you to compile, assemble and link using one command. This enables the compiler to be co-ordinated into third party development environments, such as Microchips MPLAB IDE. 5. 5 insert system tools 5. 5. 1 conference program An assembly program is a computer program for translating congregation oral communication essentially, a mnemonic mental internal representation of machine vocabulary into butt code.A cross assembler (see cross compiler) produces code for one type of processor, but runs on other. The computational step where an assembler is run is known as assembly time. Translating assembly instruction mnemonics into opcodes, assemble rs provide the ability to use symbolical call for memory locations (saving uninteresting calculations and manually modify addresses when a program is slimly modified), and macro facilities for execute school textual alternate typically used to encode common short sequences of instructions to run inline preferably of in a subroutine.Assemblers are farthermost simpler to write than compilers for high-altitude wordings. conclave oral communication has several benefits advance collection language programs are primarily the accelerated programs around. musculus quadriceps femoris concourse language programs are often the smallest. potential You butt do things in assembly which are difficult or unsurmountable in High level languages. noesis Your knowledge of assembly language will help you write bust programs, even when using High level languages. An example of an assembler we use in our project is rad 51. . 5. 2 Simulator Simulator is a machine that shams a n environment for the purpose of training or research. We use a UMPS simulator for this purpose in our project. 5. 5. 3 UMPS general microprocessor program simulator simulates a microcontroller with its outside(a) environment. UMPS is able to simulate impertinent components connected to the microcontroller. Then, debug step is dramatically reduced. UMPS is not utilise to only one microcontroller family, it target simulate all chassis of microcontrollers.The main limitation is to check less than 64K-Bytes of RAM and ROM space and the good microcontroller library. UMPS provide all the facilities other affordable simulator does not have. It offers the user to see the real effect of a program and a way to change the microcontroller family without ever-changing IDE. UMPS provide a low-priced solution to the problems. UMPS is in truth the best solution to your evaluation. 5. 5. 4 UMPS key features -The speed, UMPS can run as fast as 1/5 the real microcontroller speed. No need t o grasp 2 age to see the result of a LCD routine access.All the microcontroller separate are simulated, interrupts, communication protocol, parallel handshake, timer and so on. UMPS have an integrated assembler/disassembler and debugger. It is able to accept an foreign assembler or compiler. It has a text editor which is not exceptional to 64K-bytes and shows keyword with color. It can excessively transport with an orthogonal compiler to integrate all the debug facilities you need. UMPS is universal, it can advantageously be lengthened to other microcontroller with a library. take aim us for toolkit development. away vision simulation is not limited.It can be all-inclusive to your proper ineluctably by writing your own DLL. UMPS allows you to assess at the worst make up the hap to build a microcontroller project without any cable. UMPS accommodate a complete support on each microcontroller which describe special registers and each instruction 5. 5. 5 compili ng program A compiler is a program that reads a program in one language, the mention language and translates into an homogeneous program in another(prenominal) language, the target language. The version process should also invoice the armorial bearing of errors in the source program. bloodline plan compiling program range architectural plan v phantasm Messages at that place are two move of compilation. The analysis part breaks up the source program into constant piece and creates an talk terms representation of the source program. The deduction part constructs the coveted target program from the arbitrate representation. 5. 5. 6 The cousins of the compiler are 1. Preprocessor. 2.Assembler. 3. docker and Link-editor. A uninitiate approach to that preceding end might run the phases serially. 1. lexical analyser takes the source program as an input and produces a long withdraw of tokens. 2. phrase structure analyser takes an out of lexical analyser an d produces a large tree. semantic analyser takes the output of phrase structure analyser and produces another tree. Similarly, ordinary code beginning takes a tree as an input produced by semantic analyzer and producesintermediate code 5. 5. 7 Phases of compiler The compiler has a number of phases plus symbol table managing director and an error handler. stimulant drug ascendent course v lexical analyzer v sentence structure analyzer v symbol submit coach-and-four semantic analyser demerit charabanc v intercede code germ v scratch Optimizer v order Generator v bulge bell ringer Program 5. 6 evasiveness expound The deceit of one presentation unit is carried out in the followers sequence. ? Finalizing the total circuit diagram, list out the components and sources of procurement. ? Procuring the components, testing the components and application the components. ? reservation layo ut, repairing the interconnection diagram as per the circuit diagram. piece the components as per the component layout and circuit diagram and join components. ? integrating the total unit, intertwining the unit and final testing the unit. CHAPTER 7 coating The System RFID ground muscularity is develop and operated successfully in the laboratory. The prepaid aptitude mebibyte was working the right way and perfectly. The circuit having potential and current transformers which gives the power consumption in elongate form. This is reborn to digital and the reborn one is once more converted into KWH form i. e one unit. gibe to the duty rates stored in the microcontroller, The consumed units and damage are displayed on the LCD. time to come enhancements Our project is just to caluculate the reading i. consumed power and caluculate the be and then display the cost on the LCD. In future(a) this circuit can also be used as a prepaid brawn meter using a unused type arrang ement. For we neediness to add a apt card reader and relay in extra. collectible to this every customer has a dexterous card with some impute and after complemental these credits we once again go to EB and recharge the card. The qualification meter reading can be send to the EB by implementing small kind of SCADA system, using this the readings can be straightly supervise by the EB. mark includepic. h includelcd_16x4. c __CONFIG(XT & WDTDIS & PWRTDIS & BORDIS & LVPDIS & WRTEN & DEBUGDIS & DUNPROT & UNPROTECT) reverse init() oid ADC_VTG_CT() vacuum ADC_VTG_CT1() vanity disp_meter() lift delay() write_eeprom(unsigned char add,unsigned int data) unsigned int read_eeprom(unsigned char add) unsigned int i, j,bal,gsmcost, short(p),vltg,cathode-ray tube,tmp,tmp1,k,fcrt,escp,cap_time,testeng,Engeeprom,tempvalue,ROTabv snow=0,ROTupt speed of light=0 bank2 unsigned char mill_count,tick1=0,h15,rec=0 bank1 unsigned char sec, min,hr,check1,VHUDS,VTENS,VONES,CHUDS, CTENS, CONES,COLA CK,COTENTH, ETHOD,EHUDS,ETENS,EONES,COTHOD,COHUDS,COTENS,COONES,EEONES,EETHOD,EETENS,EEHUDS,EELACK,EETENTH,unteeprom,unit,var=0,u11,u12,u13 unsigned char tm,tt,th,ctl float cpwt1,cpwt2, nothing, follow_engy, salute bit check_dev,card_present ank2 unsigned char qt,msg,n,set1=0,set2=0,set3=0,set,set4=0,tab,cap,cap1,cap2,eeprom_erase_cnt unsigned interrupt isr( demoralise) if(TMR1IF) TMR1IF=0 mill_count++ //mill_count, scan_count, keypress, check, keyok,key if(mill_count=25) mill_count=0 sec++ if(sec=59) tick1=1 sec =0 ctl=1 min++ if(min59) min=0 hr++ if(hr23) hr=0 //mill_count //TMR1IF if(RCIF==1) hrec=RCREG rec++ if(rec==12) card_present=1 rec=0 RCIF=0 head off main() init() RC4=0 while(1) lcd_move(0,0) lcd_puts( zilch thou) RC4=0 if(card_present==1) lcd_move(1,0) lcd_puts(Recharged) if(h9==51) lcd_move(1,10) lcd_puts(Rs. cytosine) or(j=0j=45000j++) for(j=0j=45000j++) gsmcost= carbon set1=1 card_present==0 lcd_clear() if(h9==56) lcd_move(1,10) lcd_puts(Rs. 50 ) for(j=0j=45000j++) for(j=0j=45000j++) gsmcost= 50 set1=1 card_present==0 lcd_clear() while(set1==1) //&& SW==1) //while(SW==1) lcd_move(0,0) lcd_puts( strength molarity) COLACK =read_eeprom(0x00) COTENTH =read_eeprom(0x01) COTHOD =read_eeprom(0x02) COHUDS =read_eeprom(0x03) COTENS =read_eeprom(0x04) COONES =read_eeprom(0x05) Engeeprom = ((COLACK* constant of gravitation00)+(COTENTH* guanine0)+(COTHOD* thou)+(CHUDS * ampere-second)+(COTENS *10)+COONES) unteeprom =read_eeprom(0x06) ROTupt atomic number 6 =read_eeprom(0x07)ROTabv snow =read_eeprom(0x08) disp_meter() RC4=1 DelayMs(10) ADC_VTG_CT() while(set2) lcd_move(0,0) //lcd_putn(check1) disp_meter() ADC_VTG_CT1() lcd_move(0,0) lcd_puts(vtg) lcd_write(VHUDS+0x30) lcd_write(VTENS+0x30) lcd_write(VONES+0x30) lcd_move(0,8) lcd_puts(crt) lcd_write(CHUDS+0x30) lcd_puts(. ) lcd_write(CTENS+0x30) lcd_write(CONES+0x30) RC4=1 DelayMs(10) if(curt) tm = min cap_time //check1=1 if(min 58) th++ tt = (th*60)+tm if(ctl==1) ctl=0 //ch eck1=2 zip = ((vltg * curt *(float)tt)/hundred thousand) nix = verve* g-force testeng = (int) naught elan vital = dynamism/ kB Cost = Energy * cpwt1Cost_engy = Cost + Cost_engy bal = gsmcost Cost_engy Cost_engy = Cost_engy* one thousand Engeeprom = (int)Cost_engy //bal = gsmcost Engeeprom fcrt =bal COLACK = fcrt/hundred thousand fcrt=fcrt% ten thousand0 COTENTH=fcrt/ ten thousand fcrt=fcrt% jet0 COTHOD=fcrt/ gee fcrt=fcrt%1000 COHUDS=fcrt/100 fcrt=fcrt%100 COTENS=fcrt/10 fcrt=fcrt%10 COONES=fcrt write_eeprom(0x00,COLACK) write_eeprom(0x01,COTENTH) write_eeprom(0x02,COTHOD) write_eeprom(0x03,COHUDS) write_eeprom(0x04,COTENS) write_eeprom(0x05,COONES) DelayMs(2) Cost_engy = Cost_engy/1000 if(Energy0. 900) Energy = 0 unit++ unteeprom = unit write_eeprom(0x06,unteeprom) DelayMs(2) if(unit==100) cpwt1 = cpwt2 nit = 0 else set1=1 set2=0 lcd_clear() /*if(SW==1) while(SW==1) RC4=0 set1=0 set2=0 lcd_clear() */ //while(set2) //while(1) //main() void init() TRISA = 0xFF TRI SB = 0xF0 TRISC = 0x80 PORTB = 0x00 ADCON1=0X82 GIE=PEIE=TMR1IE=RCIE=1 TMR1L=0X17 TMR1H=0XFC SPBRG=25 BRGH=1 RCSTA=0X90 TXSTA=0X24 cpwt1 = . 4 Cost_engy = 0 unit = 0 unteeprom = 0 Engeeprom = 0 eeprom_erase_cnt=read_eeprom(0x10) if(eeprom_erase_cnt5) eeprom_erase_cnt=0 write_eeprom(0x10,0) write_eeprom(0x00,0) write_eeprom(0x01,0) write_eeprom(0x02,0) write_eeprom(0x03,0) write_eeprom(0x04,0) write_eeprom(0x05,0) else eprom_erase_cnt++ write_eeprom(0x10,eeprom_erase_cnt) lcd_init() //set1=1 T1CON=0X01 DelayMs(10) void disp_meter() if(set1) lcd_move(1,0) lcd_puts(U) lcd_putn(unteeprom) if(set2) fcrt =testeng ETHOD=fcrt/1000 fcrt=fcrt%1000 EHUDS=fcrt/100 fcrt=fcrt%100 ETENS=fcrt/10 fcrt=fcrt%10 EONES=fcrt lcd_move(1,0) lcd_puts(E) lcd_write(ETHOD+0x30) lcd_puts(. ) lcd_write(EHUDS+0x30) lcd_write(ETENS+0x30) lcd_write(EONES+0x30) lcd_move(1,8) lcd_puts(C) if(COLACK) lcd_write(COLACK+0x30) lcd_write(COTENTH+0x30) lcd_write(COTHOD+0x30) else if(COTENTH) lcd_write(COTENTH+0x 30) lcd_write(COTHOD+0x30) //lcd_puts(. ) lcd_write(COHUDS+0x30) lcd_write(COTENS+0x30) //lcd_write(COONES+0x30) else lcd_write(COTHOD+0x30) lcd_puts(. ) lcd_write(COHUDS+0x30) lcd_write(COTENS+0x30) lcd_write(COONES+0x30) /*********************AT COMMANDS********gsm energy meter coding********* if(tick1==1) tick1=0 u11=unteeprom/100 u12=(unteeprom%100)/10 u13=unteeprom%10 sendtopc1(AT) TXREG=13 while( TXREG) delay() for(k=0 k

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.