Showing posts with label microcontroller. Show all posts
Showing posts with label microcontroller. Show all posts

Monday, January 20, 2014

Atmel microcontroller Easy Downloader Circuit

Easy Downloader Circuit
Atmel microcontroller series AT89Cxx51 Easy Downloader is one of the downloader that is often used to write data to program the Atmel microcontroller AT89CXX51. Easy Downloader AT89Cxx51 ATMEL microcontroller is using the serial port as a channel of communication with the computer. 



Easy Downloader ATMEL Microcontroller AT89Cxx51 can be used to program Atmel AT89CXX51 in parallel. Atmel microcontroller series AT89Cxx51 Easy Downloader is quite simple to make your own because the components necessary to membutanya not complex. Atmel microcontroller series AT89Cxx51 Easy Downloader do not support the serial programming microcontrollers ISP. In the article Easy Downloader ATMEL Microcontroller AT89Cxx51 only displays images Easy Downloader Microcontroller series from Atmel AT89Cxx51 only and are simple.
Next full text...

Thursday, December 26, 2013

00 To 99 Minute Timer Using PIC16F628A Microcontroller

his might be a good practice project for beginners who just started learning embedded electronics. It is about making a very basic programmable digital timer using a PIC16F628A microcontroller. The timer duration can be set from 0-99 minutes.

As I mentioned earlier, the microcontroller used in this project is PIC16F628A running at 4.0 MHz clock using an external crystal. An HD44780 based 16×2 character LCD is the main display unit of the project where you can watch and set the timer duration using tact switch inputs. There are three tact switches connected to RB0 (Start/Stop), RB1 (Unit), and RB2 (Ten) pins. You can select the timer interval from 0-99 min using Unit and Ten minute switches. The Start/Stop switch is for toggling the timer ON and OFF. When the timer gets ON, a logic high signal appears on the RA3 pin, which can be used to switch on a Relay. The circuit diagram of this project is described below.


When the device is powered ON, the microcontroller initializes the LCD display and shows the following message. The timer is initially OFF and so does the LED or relay, whichever is connected to RA3 pin. You can set time duration between 00-99 min (in step of 1 min) using the Unit and Ten tact switches. Each switch press will increment the corresponding time digit.

When the desired time is set, press the Start/Stop switch to turn ON the timer. The RA3 pin goes high (LED glows) and the count down begins. When the timer is ON, the remaining time is also shown on the LCD screen. When the time elapsed, the timer stops and the LED turns OFF. You can interrupt and stop the timer at anytime by pressing the Start/Stop switch once more. The firmware for PIC is developed using mikroC Pro for PIC compiler. The use of Timers are avoided for simplicity. The time delays are created using the Delay_ms() function of mikroC, which seems to give reasonably accurate timing delays.

Download Mikroc Source Code And HEX File



Next full text...

Wednesday, November 13, 2013

AT89C2051 microcontroller circuit

Real time controller AT89C2051
Real time controller is a device used to exercise control over household device continuously ongoing and scheduled. The series of Real Time Controllers with microcontroller AT89C2051 which dituls in this article is a tool that can do that serve targeted. The series of Real Time Controller with Microcontroller AT89C2051 Atmel AT89C2051 uses a data processor and controller as device installed. 


In the application directly devices requires a separate interface from a wide range of Real Time Controllers with this AT89C2051 microcontroller. When will connect the device with the AC power source to use interface optocoupler (MOC) or solid state relay. Devices that can be connected with the series of Real Time Controller with Microcontroller AT89C2051 include lights, water machines, fans, electronic gate. The series of Real Time Controllers with this AT89C2051 microcontroller to control a height of water level, controlling the flame lights the scheduled SCARA and censored.

Specifications Series Real Time Controller with AT89C2051 Microcontroller
The series of Real Time Controller with Microcontroller AT89C2051 uses a computer to perform serial communication settings via computer. The series of Real Time Controller with Microcontroller AT89C2051 has 6 units of output channels that can be independently controlled depending on the program induced in the tool. Output in the series of Real Time Controller with AT89C2051 microcontroller requires an interface to deal with equipment that will be in control.
Next full text...

Saturday, October 26, 2013

DAC with MCS5 Microcontroller

DAC With MCS5 Microcontroller
The figure below shows the Configuration DAC With artificial MCS51 Microcontroller National Semiconductor, capacitors C1, C2 and form a series of 12 MHz XTAL oscillator, capacitor C3 and resistor R1 form a series reset.


Digital scale is given to the B1 to B7 (leg 5 to 12) in the IC DAC0800, the binary value of the digital scale was converted into an analog magnitude of the current at IOUT (ft 4 DAC0800) and IOUT * (feet 2 DAC0800), then by IC Operational Amplifier LM741 flow is converted into voltage. The resulting voltage expressed by the formula shown in Figure below, in addition to depending on a digital scale weight value is given, this voltage depends on the size of Vref (DAC0800 14 feet).

DAC With MCS5 Microcontroller
figure.1 DAC With MCS5 Microcontroller

C3 is mounted on leg 16 and ground is useful for stabilizing the voltage generated. DAC0800 and LM741 using voltage source +12 Volt and -12 Volt, is somewhat different from the voltage that is usually used for digital circuits, so that digital signals can be received well IC DAC0800, DAC0800 equipped foot VLC (pin 1) for various voltage levels menyesesuaikan types of digital ICs. In the DAC0800 data sheet are shown in various series to be installed on this leg for DAC0800 can be used for a variety of digital IC family. In the circuit of Figure above, the DAC0800 is connected to the microcontroller MCS51 family who work at TTL voltage levels, for this purpose VLC leg connected to ground.

Behind the legs of the IC DAC0800 B1 through B8 are not equipped to accommodate a latch that is fed a digital scale, changing the combination of digital signals on the legs is a direct result of output voltage change. Construction inputs such DAC0800, DAC0800 result can not be connected directly to a channel-data (data bus) microprocessor system, the relationship DAC0800 to the processor must pass through the parallel port.

In Figure 1, the DAC0800 is connected to the parallel port P1 from AT89Cx051. Connecting the DAC0800 to the other MCS51 family, for example AT89C51, can pass parelel ports P0, P1, P2 or P3, depending on the conditions established series. Instructions to remove the voltage in the circuit of Figure 1 is very simple, just use instruction MOV P1, A analog scale with the understanding that wish to be raised previously been stored in the accumulator A.
Next full text...

Sunday, October 20, 2013

Using Config Bits appearing in Microcontroller Based Projects


Microcontrollers attend to to take place fanatical to a detail drive, so while theyon the subject of very flexible strategy these days, at hand are a amount of various (often conflicting) options in lieu of how you might need the hardware to handiwork. You might think with the aim of this configuration is complete fashionable software, but could you repeat that? if you want the hardware to proceed a assured way from the very start? Keeping in mind with the intention of C.P.U PIC diplomacy can "riding boot" in a carry some weight of milliseconds, in attendance needs to be present a way you indicative the hardware how to perform in advance of it opening up. This article covers how to understand your microcontroller based project working the way you expect what time it starts up.

Enter config bits, before, seeing that they used to occur called, config fuses. Back inwards the days as soon as microcontrollers were syllabus-as soon as campaign, you really did blow a fuse in order to program them. now, for the most part micros partake of flare recall with the intention of can be planned tens of thousands of period, but in attendance are still single-period-programmable (OTP) procedure all but.

In one court case, nears a bunch of "config terminology" to facilitate describe how the micro is going away to conduct yourself from the induce-stretch. accede tos look by the side of a number of of these options (well select the PIC18F2620 so an model) and therefore perceive how to list them. Sourceboost gives you all the config strings featuring in a standing by-to-utilize format on behalf of together with in your project. The format has the config bits suffixed with the same famous person as the config word so you can ensure with the purpose of the accurately bits are departure in the right word. Of course of action, your config language yearn for survive discrete if youon the subject of using a different microcontroller, but you be supposed to study as much as necessary at this time to promontory you during the right direction.

In the 18F2620, the config bits are stored in twinkle, but next to a great recall location. Theya propos stored on 0x300001 and upwards. intended for historical reasons due to the way remembrance was previously arranged on PIC microcontrollers, config expressions are numbered with every add up to having a "high" and "low" byte.

CONFIG1L doesnt exist on the 18F2620. If it did, it would live by 0x300000 location.

CONFIG1H contains bits so as to spell out oscillator options. commonly, into Embedded Adventures projects we try and value peripheral crystals which offer supplementary accurate and steadfast results. This does use up two pins however, and on occasion these can subsist new essential than the hurry by which the disfigure is running. The outdoor gemstone oscillator is referred to in the function of the HS oscillator (if youpertaining to responsibility the classic obsession of frustrating to run the micro as fast as it want get to). into the 18F2620, you can too enable the PLL module which will allot you a four-epoch break the speed limit boost. From CONFIG1H are besides options to enable the fail-safe control screen (with the purpose of switches to the domestic oscillator be supposed to the outer solitary fail, and an option to enable the switching among atypical oscillator sources.

We usually advise with the purpose of you utilization an peripheral rock, and roll inedible one oscillator switching / failover modes. arrived prototyping, it is weighty to partake of steadfast, repeatable results (mostly so you can reduce the axes of miscalculation). It is probable to configure the 18F2620 to start up using the interior oscillator (which runs by 8Mhz, otherwise 32Mhz with the PLL enabled) and subsequently switch to the outside lone (we use a 10Mhz sparkler with PLL enabled giving you 40Mhz). with the aim of gives you nearer startup from interrupts featuring in nap mode before on bootup, if thats valuable, however in support of prototyping, this is normally not essential.

Our recommended config row for CONFIG1H:

#pragma DATA _CONFIG1H, _OSC_HSPLL_1H & _IESO_inedible_1H & _FCMEN_OFF_1H

CONFIG2L handles bronzed-exposed reset and the power up timer. Brown Out Reset (or else BOR) is the talent on behalf of the microcontroller to reset itself if the supply voltage cascade under a specified threshold. It self-control wait all the rage reset state until the supply goes back completed the threshold. This can mean a number of battery saving (on slightest, formerly the battery is preset ahead of a selected level, itll be over draining power in the role of quickly) - but on with the intention of use presents veto functionality open anyway. The power on timer waits on first power-on used for the supply to travel more than the BOR voltage threshold, at that moment hangs around for an additional 65ms in advance kicking things rotten for real. This can help ensure with the aim of your power supply is steady before annoying to accomplish several code.

We grasp seen around pretty unpredictable results from the 18F2620 while tough some LED put on show panels. We concept the software was rolling or else resetting the micro while stylish information, could you repeat that? was event was the BOR was being tripped to the same extent additional LEDs were lit and the power supply dropped. As such, but for youve got a real need in support of it, we advise switching it inedible. Leaving the power supply to settle formerly preliminary the firmware, is by and large a satisfactory suggestion (yourelating to probably not disappearing to notice the 65ms it takes).

#pragma DATA _CONFIG2L, _BOREN_inedible_2L & _BORV_2_2L & _PWRT_ON_2L

CONFIG2H gives you settings used for the watchdog timer. This is a timer with the purpose of resets the PIC in the sphere of a precise amount of occasion (you can broadly detail how slow that might transpire). It might be good chart to reset your PIC if youabout burden something from which you might on no account recover - although confidently youre in print good a sufficient amount code with the aim of this cannot go off! on the other hand, the watchdog timer can as well tug the PIC shown of have a lie-down mode. This channel you can display in favor of the PIC to operate to sleep for a several amount of phase (if nothing as well happens). For prototyping, we advise switching the watchdog timer rotten. If you figure out enable it, make up certainly you reset the watchdog timer steadily before - well, you can deduction I beg your pardon? force transpire.

#pragma DATA _CONFIG2H, _WDT_sour_2H & _WDTPS_128_2H

CONFIG3H has a collection of configuration items. You can point out intended for the RE3 pin to exist open (when input merely) before for with the intention of pin to be MCLR (which resets the micro as soon as pulled low). For prototyping, being able to reset the micro by critical a button is easier than pulling the power ready.

The LPT1OSC tad gives the option of a "area of high pressure power" mode or else a "low power mode". The low power mode is supplementary delicate happening high blare environments. So if battery practice is very essential, you need to design your circuit carefully. representing prototyping, of pattern, we would vouch for leaving this in high power mode.

PBABEN, allows you to list if PORTB pins 0 - 4 be supposed to wake up what analog input pins or else digital pins in the lead reset. Of course you can adjust this popular software in the ADCON1 register on a few calculate.

The CCP module is a Capture / Compare / PWM module and a final CONFIG3H fragment allows the "steering" of this output to ensue on either RC1 before RB3. This is within reach to be able to change if you require the other functionality open on solitary of these pins (RB3 is besides analogue input 9 and RC1 can be Timer 1 oscillator input). on the other hand, your PCB arrangement might happen easier if you may well move this output to lone before the other. instead of prototyping, in the main this doesnt problem either way.

#pragma DATA _CONFIG3H, _CCP2MX_PORTC_3H & _PBADEN_inedible_3H & _MCLRE_ON_3H

CONFIG4L contains various appealing options and shows very openly how worthy it is to ensue able to configure the PIC already startup.

The DEBUG smidgen allows hardware debugging. You can step through code, stage set breakpoints and so on - if you get your software set right and this tad unfurnished. Hardware debugging and requires the exclusive advantage of RB6 and RB7 (also used in place of ICSP brainwashing). now all honesty, we uncover to ongoing output is in general sufficient to find bugs, although you can debug a batch of PICs with just a PicKit2.

XINST allows for the 18F extended education set mode. This isnt used by Sourceboost and if you switch it on by underestimate (despite the consequences of the compiler youon the subject of using) near desire be alive several pretty unpredictable results. single of our readers spent days tiresome to unearth what did you say? was mistaken with his code merely to realise the XINST morsel was unyielding.

LVP gives you the gift to curriculum the PIC using ICSP lacking requiring the "elevated" Vpp voltage. in attendance is a catch however - you need to dedicate the RB5 pin (PGM) to being an indicator if you are within indoctrination mode or else not. particular the PicKit2 generates the genuine voltage anyway, here doesnt seem to be real a plight of profit in switching this on instead of prototyping purposes.

to end with, the STVREN gives the option of having the PIC reset if the stack overflowed or else underflowed. If, for paradigm, you call too many nested functions, it would allow the PIC to reset. one time reset, you can examine why the PIC reset and present yourself a fault. We counsel leaving this on - if your PIC boots participating in the hub of responsibility something, you can sensibly simulate with the purpose of youve used up the stack pause (likely at what time youa propos deep in a nested location and in that case an interrupt occurs).

#pragma DATA _CONFIG4L, _STVREN_ON_4L & _LVP_sour_4L & _DEBUG_OFF_4L & _XINST_sour_4L

CONFIG5L gives the option of specifying if whichever solitary of four neighboring blocks of recollection are protected from any attempts by the PIC to alter (to be exact note down) the burst reminiscence ideals.

#pragma DATA _CONFIG5L, _CP0_sour_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_inedible_5L

CONFIG5H givest the option of caring the jam of reminiscence preliminary on 0x0000 to 0x7fff) - used by approximately bootloaders, like well as a spot to allow the protection of EEPROM recollection. The PicPack bootloader, "Boostbloader", resides appearing in higher recollection, import with the aim of while it is to some extent a smaller amount robust than a safe-down, physically protected bootloader, it doesnt require the "twin vault" in support of interrupts to bootloaders located in drop recollection accomplish. We may possibly provide this being an option in the hope.

#pragma DATA _CONFIG5H, _CPB_rancid_5H & _CPD_OFF_5H

CONFIG6L allows the protection of recollection blocks being send a letter to protected.

#pragma DATA _CONFIG6L, _WRT0_rancid_6L & _WRT1_OFF_6L & _WRT2_sour_6L & _WRT3_OFF_6L

CONFIG6H, CONFIG7L and CONFIG7H assign further granular protection, allowing blocks of reminiscence to be situated protected from whilst the code being executed is not concerning the same oppose. We might, in favor of exemplar, build a bootloader so as to was "secret" and unable to be timely by several other code.

#pragma DATA _CONFIG6H, _WRTC_rotten_6H & _WRTB_OFF_6H & _WRTD_sour_6H

#pragma DATA _CONFIG7L, _EBTR0_inedible_7L & _EBTR1_OFF_7L & _EBTR2_sour_7L & _EBTR3_OFF_7L

#pragma DATA _CONFIG7H, _EBTRB_rancid_7H

While narrowly speaking theyregarding not config language, the DEVID words allow code to determine which prototypical of the damage is running and which hardware revision. This is vital once at hand are bugs fashionable the hardware with the purpose of are fixed in excess of poles apart revision levels and code needs to kill differently based on the outcome.

Making configs

Youve probably worked old hat by at this moment with the purpose of the Sourceboost compilers config defines are expertly conceived so that you can simply & laid back the appropriate options; this wealth you dont need to be successful out exactly which spot positions act pardon?. The #pragma DATA gives you the skill to shove a byte happening a individual location (in our circumstances, into a config word slot).

Other PICs

at this junctures the config we depletion with the PIC16F88:

#pragma DATA _CONFIG, _CP_sour & _CCP1_RB0 & _DEBUG_OFF & _WRT_safeguard_inedible & _CPD_OFF & _LVP_OFF & _PWRTE_sour & _WDT_OFF & _PWRTE_ON & _BODEN_rotten &_MCLR_ON & _INTRC_IO

Yep, with the intention ofs privilege, its solely individual word sustained. nearly of these options willpower probably be present familiar to you already.

Troubleshooting

If your damage is not behaving and you fancy to effect impossible if youve made a faux pas hip your config bits, and dexterous hint is to use Microsofts MPLAB IDE to import the.magic charm box file youve produced by clicking on Menu | Import... next Configure | Configuration Bits... at this points the screen youll discover while importing the PIC18F2620 BoostBloader.

You can even variation the config bits if you would like, it follows that export again in the function of a.magic charm file, although keep happening mind this doesnt change your source code itself.

what did you say? youve probably realised at this point is with the purpose of the bootloader categorically has config bits embedded in the.curse line. Our usual PicPack programs dont - since we simulate youwith regard to running with a bootloader already installed. If you work out neediness to predetermine candidly with ICSP, of stream youll need to benefit config bits to be selected for your PIC run the way you be determined. Check banned the configbits.h file used by Boostbloader - weconcerning early to build up a files of near config bits as well as particular configuration options to veer for all things on or else rotten (these you effortlessly place taking part in the config.h dossier in your project).
Next full text...

Friday, October 18, 2013

Digital Thermometer with data processing of a microcontroller AT89C4051

digital thermometer
Digital Thermometer 0-100.0°C is a digital thermometer that operates in modetemperature measurement in Celsius (° C). Digital Thermometer 0-100.0 ° C in this article uses data processor in the form of a microcontroller AT89C4051.



Temperature sensors used in Digital Thermometer 0-100.0 ° C. This temperature sensor LM35D. Digital Thermometer 0-100.0 ° C. It uses the temperature measurement data viewer in the form of 1 line LCD viewer. Digital Thermometer 0-100.0 ° C. It can display the temperature measurement data with a resolution of 0.1 ° C.

Digital Thermometer with data processing
Digital Thermometer Circuit Diagram


Digital Thermometer 0-100.0 ° C. These temperature sensors make use of LM35D as temperature sensing. In Digital Thermometer 0-100.0 ° C. This temperature sensor measurement data this LM35D (Level Voltage) is then converted into 4-bit binary data using the ADC CA3162.

Then the 4-bit data from ADC CA3162 which is a measurement of data if the temperature is in the AT89C4951 microcontroller so that it becomes an operating principle of temperature measurement based on digital thermometers. In the final stage of the Digital Thermometer 0-100.0 ° C. This is the appearance of digital data temperature measurement, using digital data viewer of the LCD 1 line.
Next full text...

Thursday, October 3, 2013

Digital Thermometer with data processing of a microcontroller AT89C4051

digital thermometer
Digital Thermometer 0-100.0°C is a digital thermometer that operates in modetemperature measurement in Celsius (° C). Digital Thermometer 0-100.0 ° C in this article uses data processor in the form of a microcontroller AT89C4051.



Temperature sensors used in Digital Thermometer 0-100.0 ° C. This temperature sensor LM35D. Digital Thermometer 0-100.0 ° C. It uses the temperature measurement data viewer in the form of 1 line LCD viewer. Digital Thermometer 0-100.0 ° C. It can display the temperature measurement data with a resolution of 0.1 ° C.

Digital Thermometer with data processing
Digital Thermometer Circuit Diagram


Digital Thermometer 0-100.0 ° C. These temperature sensors make use of LM35D as temperature sensing. In Digital Thermometer 0-100.0 ° C. This temperature sensor measurement data this LM35D (Level Voltage) is then converted into 4-bit binary data using the ADC CA3162.

Then the 4-bit data from ADC CA3162 which is a measurement of data if the temperature is in the AT89C4951 microcontroller so that it becomes an operating principle of temperature measurement based on digital thermometers. In the final stage of the Digital Thermometer 0-100.0 ° C. This is the appearance of digital data temperature measurement, using digital data viewer of the LCD 1 line.
Next full text...