Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

up down counter assembly help please

Status
Not open for further replies.

cemal65

New Member
hello everybody,

first of all ,sorry for my poor english.

I made 0-99 up down counter using 16F628A ,

I have a question İf you answer I will be happy.

I want when counter digits "0 0" pic give me a one alarm (for examle using RB7 or RA4)

ohter numbers "0 1" or "0 2" or"0 3"................."9 9" not any alarm output.

I try many different code added in ASM files but its not working.

Can you show me how can ı write some code and where in ASM files..

Thank you for any help..
 

Attachments

  • 2DigitUpDwn.asm
    5.1 KB · Views: 213
  • 2DigitUpDownCct-2.gif
    2DigitUpDownCct-2.gif
    10.2 KB · Views: 319
Hi,

In your 'main' section after the Up and Down calls, the Units and Tens hold the value to be displayed.

You need to do a simple test on them to see if they are both Zero using the MOVF instruction, then the testing the Zero flag of the Status register BTFSS STATUS,Z

When they are both Zero you can turn ON - BSF PORTA,4 to activate your alarm.

However notice that the 7 seg drivers turn on PortA bits 0 and 1 but by changing all of PortA, you will have to change these to set just those two bits using BSF and BCF PORTA,0 and 1
 
Status
Not open for further replies.

Latest threads

Back
Top