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.

interrupt and flowcode

Status
Not open for further replies.

seti75

New Member
hello

sorry for my English (I am French, I hope you understand)

I try to interrupt on RB0 Flowcode with, but I can not
I board read all the manuals, all manuals, impossible to understand
simulation it works, but RB0 (interruption) does not work
There's one here if specialist Flowcode I am willing to post my program

I board tried to have the following operation

RB1 RB0 input or on -> turns on the LED associated with it
(RB0 -> ra0) / (RB1 -> ra1) ---> Correct functioning
RB4 -> Manual reset
I want to reset it after few seconds after switching on a led (or RA0 or RA1) .. .. automatically without removing the manual reset (RB4)
(led rao or led ra1 --> on.....after 10 sec reset...rb0)
thanks
 
Last edited:
please post the program.
 
Flowcode the file you want ?
asm file is generated by Flowcode.
my problem is that as RB0 is enabled and then disabled I can no longer lit LEDs on PORTB, 1 / PORTB, 2.
before activation of RB0 everything works fine.

question, to int RB0, completely blocking the program ?
asm file from here and Flowcode Flowcode file
thank you

action button 1 , green LED1 lights 3 second.
after an action button 1, no reaction led....(ok)
same for the button 2 and green LED 2..(ok)
LED green lights only if the other was led on and off..(ok)

that the RB0 (int) red led into action no longer control the LEDs green

look problem int rb0 --> https://tinypic.com/player.php?v=f4n1xf&s=7

program

https://www.imagup.com/data/1127029141.html

INT (1)

https://www.imagup.com/data/1127029202.html

(2)

https://www.imagup.com/data/1127029228.html
 
Last edited:
thank you, posted in 2 minutes

--> (ATT.zip) --> **broken link removed**

Simulation of Flowcode it works very well
but the 16F84 programmed and actual test,
everything works but that a RB0 is a green LED off (ok) and after the delay (b7 off) nothing works !
? ..
 
Last edited:
This code is a mess, your flowchart has no main loop, your making it go random places by using the goto command.

What is it your trying to do and i will see if i can rewrite it for you

Am i right in thinking the following,

When you press RB0, you want RA0 LED to light up
When you press RB1, you want RA1 LED to light up
RB4 is a reset button

If you press either RB0 or RB1 the associated LEDs will light for a set period and then go off on there own?
If this is correct what period do you want the leds on for?
 
Last edited:
inter A1 = "1" led green B1 ="1"
inter A2 = "1" led green B2 ="1"

led green 1 or led green 2 = "1" --> rb0 = "1"
leds green off --> led red = "1"

rb0 = "1" no leds green.

each switch should never be able to activate two times consecutively
it led, after each action of a switch, the other switch must be enabled to allow the operation of the other switch
 
ok so you press switch 1, led comes on for a few seconds, then switch 1 is disabled, press switch 2, led comes on for a few seconds and then disables allowing switch 1 to be pressed again?
 
Last edited:
exactly , switches can be a 1 (lock) the operation does not change

really, thank you very much,
 
ahh iv just noticed, this PIC only has 1 interrupt on RB0 which you are using for your reset button, the other 2 switches are on RA0 and RA1, with the corresponding LEDs on RB1 and RB2, i will do a flowchart for you and see if it works for you
 
RB0 (int) is a reset, he must immediately turn off the LEDs green
but if RB0 is no actived, the switches can operate normally
 
so just to clarify,

switch 1 is on RA0
switch 2 is on RA1
LED 1 is on RB1
LED 2 is on RB2

RESET is on RB0
RESET LED is on RB7

If these switches can be moved around i would suggest having the 3 switches on RB0, RB1, RB2 and the 3 LEDs on RA0, RA1, RA2
 
Last edited:
exactly what, can they be moved??

Also noticed you have a 12mhz crystal setup, is this correct?
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top