Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 01, 2024, 12:10:04 00:10


Login with username, password and session length


Pages: [1]
Print
Author Topic: Urgent help from the professionals  (Read 4741 times)
0 Members and 1 Guest are viewing this topic.
orcasdeveloper
Guest
« on: March 01, 2008, 09:00:59 09:00 »


I am working in combination lock alarm system, in short

1- once the operator opens the door  a timer has to be started and counts a configurable time period
2- if the time period elapsed and correct password entered no alarm will be raised else alarm will be raised and
operator has to enter the correct password to disalarm the system
3- in case the operator want to close the door, he enters an exit code and immediatley the timer will be startted once more time for a configurable time period after elapsed if the door still opened the system will trigger the alarm untill the door got closed
4- the system has an operator/password and engineer/password accounts and the engineerr has the
ability to change passwords and alarm periods
_________________________________________
the problem facing me is that microcontroller doesnot support multitasking
i first used proton without result
iam currentlly use picbasic pro with darrel taylor instant interrupt system
and have confusing problem
the timer works if i didnot enter any password(4 character length) but once i start typing password characters before alarm raised the last character got stucked and the alarm raised without reasonable cause
 i wish to find solution to this problem with the aid of ou greats and happy return back for the forum
Logged
Ahmad_k
SCG Moderator
Hero Member
*****
Offline Offline

Posts: 763

Thank You
-Given: 173
-Receive: 1297



« Reply #1 on: March 01, 2008, 02:40:39 14:40 »

Upload your code here to check it
Logged
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1200

Thank You
-Given: 550
-Receive: 409



« Reply #2 on: March 01, 2008, 05:57:33 17:57 »

I have a simular thing and use proton, With out problems multi tasking and the same thing goes for quite a few projects that I have working, It may be a problem with your code

wizpic
 
Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
fernandodiaz
Junior Member
**
Offline Offline

Posts: 73

Thank You
-Given: 1
-Receive: 18


« Reply #3 on: March 01, 2008, 11:04:11 23:04 »

HI YOU CAN MAKE YOUR PROJECT WITH PARALLAX PROPELLER  THIS PROCESSOR HAVE INTERNL 8 CORE
(8 PROCESSORS INDIVIDUAL AND NO NEED INTERRPTS YOU CAN ASIGN EACH PROSESSOR TASK DIFERENTS WITHOUT INTERRUPTS WITH COMPILER SPIN VERY EASY PROGRAMMING
www.parallax.com
Logged
zokij
Senior Member
****
Offline Offline

Posts: 346

Thank You
-Given: 269
-Receive: 679


Nice time :)


« Reply #4 on: March 01, 2008, 11:55:53 23:55 »

HI YOU CAN MAKE YOUR PROJECT WITH PARALLAX PROPELLER  THIS PROCESSOR HAVE INTERNL 8 CORE
(8 PROCESSORS INDIVIDUAL AND NO NEED INTERRPTS YOU CAN ASIGN EACH PROSESSOR TASK DIFERENTS WITHOUT INTERRUPTS WITH COMPILER SPIN VERY EASY PROGRAMMING
www.parallax.com

Hi Huh
If he use PARALLAX then  Roll Eyes is better if he buy alarm like paradox  Undecided (will be cheapness)
Or if he have much money he can jettison  Wink ...
orcasdeveloper make good decision Shocked but need little practiced ...  Cheesy and help
Logged
caveman508
Junior Member
**
Offline Offline

Posts: 41

Thank You
-Given: 12
-Receive: 6

READ, REAd, REad, Read


« Reply #5 on: March 02, 2008, 06:12:35 06:12 »

Quote
the problem facing me is that microcontroller doesnot support multitasking

Multi-Tasking

This is a subject with many answers.....

Look at the screen you are reading this on, while you have several other "windows" open right now.....

How many processors are in your PC???

Hit Ctrl-Alt-Del for a list of all of the other "tasks" that are running in the background??

orcasdeveloper, Please understand that all processors are capable of multi-tasking, it is just a matter of programming style.  I have written all of my programs based on the style of multi-tasking.

Consider this:

Create a timer interrupt routine that decrements a variable.  Call it isr_delay_1

Now do something like this:
Code:
Do_Something();

isr_delay_1 = 45;
while(isr_delay_1);

Do_Something_New();
What you have done is create a delay between Do_Something and Do_Something_New that will be 45 times the timer interrupt rate.  OK?  COOL!!!

Pretty simple, YES.  But what IF you do 15 other things while waiting?

With further questions, I will be happy to expand on this subject.  The details are a bit long in explanation, but I will do my best to explain.

Think of this example:
Flash 5 LEDs at different rates, read a keyboard, read 5 analog channels, send serial data of current status at a regular update rate and write to an LCD display.  Do all this while maintaining a real-time clock, handling alarms and time-outs along with whatever you choose to add to the list of TASKS you want.

Please understand this is easy, but it is a different style (a different way) of programming.

Just let me know if you want to learn how to do this with the SMALLEST processor you can think of.

Be aware: There is no limit to what you can do, just imagine it, create it and DO IT.

I will be watching for your response.

Just imagine,

the Caveman smiles
 
Logged
orcasdeveloper
Guest
« Reply #6 on: March 02, 2008, 10:24:39 10:24 »

CHECK ATTACHMENT

Posted on: March 02, 2008, 11:16:23 11:16 - Automerged

HI WIZPIC
I GUESS POST AN EXAMPLAR  CODE USING PROTON CAUSE IAM TRIED PROTON HOPELESSLY

THANKS IN ADVANCE



WAIT YOU

Posted on: March 02, 2008, 11:21:06 11:21 - Automerged


HI SMILY CAVEMAN
I URGE YOU TO CODE REAL ONES


I AM WATCHING
Logged
sohel
Senior Member
****
Offline Offline

Posts: 442

Thank You
-Given: 167
-Receive: 149



« Reply #7 on: March 03, 2008, 01:36:59 13:36 »

all programmer know that what did u flash here.  thanks for universal truth.

Multi-Tasking

This is a subject with many answers.....

Look at the screen you are reading this on, while you have several other "windows" open right now.....

How many processors are in your PC???

Hit Ctrl-Alt-Del for a list of all of the other "tasks" that are running in the background??

orcasdeveloper, Please understand that all processors are capable of multi-tasking, it is just a matter of programming style.  I have written all of my programs based on the style of multi-tasking.

Consider this:

Create a timer interrupt routine that decrements a variable.  Call it isr_delay_1

Now do something like this:
Code:
Do_Something();

isr_delay_1 = 45;
while(isr_delay_1);

Do_Something_New();
What you have done is create a delay between Do_Something and Do_Something_New that will be 45 times the timer interrupt rate.  OK?  COOL!!!

Pretty simple, YES.  But what IF you do 15 other things while waiting?

With further questions, I will be happy to expand on this subject.  The details are a bit long in explanation, but I will do my best to explain.

Think of this example:
Flash 5 LEDs at different rates, read a keyboard, read 5 analog channels, send serial data of current status at a regular update rate and write to an LCD display.  Do all this while maintaining a real-time clock, handling alarms and time-outs along with whatever you choose to add to the list of TASKS you want.

Please understand this is easy, but it is a different style (a different way) of programming.

Just let me know if you want to learn how to do this with the SMALLEST processor you can think of.

Be aware: There is no limit to what you can do, just imagine it, create it and DO IT.

I will be watching for your response.

Just imagine,

the Caveman smiles
 
Logged
caveman508
Junior Member
**
Offline Offline

Posts: 41

Thank You
-Given: 12
-Receive: 6

READ, REAd, REad, Read


« Reply #8 on: March 05, 2008, 02:30:30 02:30 »

sohel,

Thank-you for your reply.  I am new to this forum, and enjoy sharing knowledge, comments and ideas.

This forum has a feature new to me, that is, the "Thanks" button.  I have received a few and I thank-you all in return.

Quote
all programmer know that what did u flash here.  thanks for universal truth.

I am not sure of your use of the word "flash".  I take it to mean "post" as in my reply.

The Best to You,

Caveman
Logged
JohnnyT
Inactive

Offline Offline

Posts: 5

Thank You
-Given: 10
-Receive: 0


« Reply #9 on: March 25, 2008, 02:03:53 02:03 »

correct me if I am wrong but I believe that it is necessary to make sure that each of your tasks can complete within the given task time to use that without problems.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC