Vhdl Program For 8 Bit Up Down Counter Using Microcontroller

12/29/2017by

8 Bit Up Down Counter This project shows the application of PIC microcontroller as an up/down counter, designed to count from 0 to FF and vice versa. To simulate circuit in this project, initially activate Mixed Mode simulator from the Schematic Editor window. Simulation can be performed by selecting Run Transient analysis from Simulation menu.

Carlos Patricio Samanez Matematica Financeira Pdf on this page. This circuit uses a PIC Microcontroller, Binary to Seven Segment Decoder/Driver, Seven Segment LED Display. In this circuit, Port A of PIC Microcontroller is assigned as the Input Port while Port B is assigned as Output Port. Port A is used for selecting whether the counter works as Up Counter or as Down Counter. Arirang 4500 Deluxe Manual Woodworkers. When the LSB of Port A is high then the circuit works as an Up Counter else as Down Counter. Binary to Seven Segment Decoder decodes the data from Port B to 7-segment format, which are displayed in 7-segment displays.

The count sequence appears at the LED display in 7-segment form.

Vhdl Program For 8 Bit Up Down Counter Using Microcontroller

Vhdl Program For 8 Bit Up Down Counter Two. An up/down counter is written in VHDL and. The Atmel® AT89LP family takes 8051 microcontroller power to a. A complete 8-bit Microcontroller in VHDL. Users can program the microcontroller using. 4-bit counters including up counter, down counter and up.

8051_Up-Down Counter This project shows an Up-Down counter using 8051. The counter is designed to count upto ‘FF’. To simulate circuit in this project, initially activate Mixed Mode simulator from the Schematic Editor window. Simulation can be performed by selecting Run Transient analysis (Oscillograph) from Simulation menu. The circuit contains an 8051 chip,, Binary to 7 Segment Decoder and Seven Segment LED Display. The Interrupt Pulse Generator is connected to the INT0 pin of 8051.

In this circuit Port P2 is set as the output port. The counter is internally set through the code to count in the ascending mode.

But when an interrupt pulse is received at the INT0 pin, the counter counts in the descending mode upto zero and continues with the ascending mode. The count sequence appears at the LED display in The source code written either in C or Assembly language can be viewed from the The program is as shown: main: setb EA; EA is set to enable all interrupts setb EX0; EX0 is set to enable External Interrupt 0 mov a, #0x00; Accumulator is loaded with value ‘00’ mov r0,#0xFF; An internal counter is set to count upto ‘FF’ mov TMOD,#0x00; 13-bit timer mode is set. Mov TH0, #0xff; To get the required time delay, set T0 as ‘FFDF’ mov TL0, #0xdf loop2: mov p2,a; Value in Accumulator is copied to Port P2 clr p3.0; P3.0 is cleared to enable decoder setb TR0; TR0 is set to value ‘1’ to start the Timer 0 delay: jnb TF0, delay; Checking whether TF0 is set to value ‘1’ inc a; Incrementing the content of Accumulator djnz r0,loop2; Check whether r0 is zero. If not, jump to loop2 clr TR0; Set value of TR0 to’0’ to stop the Timer 0 clr TF0; Set value of TF0 to ‘0’ reti; Return function; function int_t0 _int_t0: push acc; Pushing the contents of Accumulator, register B, Data Pointer and Program Status Word to Stack push b push dpl push dph push psw mov psw,#0x00; The value ‘00’ is copied to PSW. Mov TH1, #0xff; To get the required time delay, set T1 as ‘FFDF’ mov TL1, #0xdf loop3: mov p2,a; The content of Accumulator is copied to Port P2 clr p3.0; P3.0 is cleared to enable decoder del: setb TR1; TR1 is set to value ‘1’ to start Timer 1 delay2: jnb TF1,delay2; Checking whether TF1 is set to value ‘1’ clr TR1; Set value of TR1 to’0’ to stop Timer 1 clr TF1; Set value of TF1 to’0’ dec a; Decrement Accumulator content jnz loop3; Check whether Accumulator content is zero. If not, jump to loop3 pop psw; Popping the contents of Accumulator, register B, Data Pointer and Program Status Word from Stack pop dph pop dpl pop b pop acc sjmp main; Jump to main The source code in the has to be after making any modifications Also the code can be during.

Comments are closed.