Coding needed.

MrChips

Joined Oct 2, 2009
30,824
HUH !!!!! :confused:
What's with the attitude?
Sorry, but I didn't mean to confuse you. There is no "attitude" from my part. I speak as a professional systems designer and am only trying to be helpful. If my approach does not mesh with yours I can butt out.
 

Markd77

Joined Sep 7, 2009
2,806
It is getting to be a pretty big project, probably bigger than I could take on on my own.
Looks like addressable terminals with their own microcontroller is the only option.
Maybe 16F628s with 7 pins used for LEDs, switches and buzzer, 2 for serial, leaving 7 pins which could be used for jumpers to set the ID number of that terminal, so they could all be programmed identically but they could be set to 128 different addresses.
I'm guessing each terminal needs 4 wires for the RS485 connection, the other 4 wires can be used for power, probably 12V with a 5V regulator at each terminal to prevent power glitches. Each terminal needs a RS485 chip and there needs to be the same number of RS485 chips at the main controller end if I understand correctly.
Could also do a similar thing for the displays and even the keypad, it's easy to program 4 chips for the 4 displays and the main controller just tells them what to display.
 

Markd77

Joined Sep 7, 2009
2,806
Thanks, I read a bit more about RS485:
http://www.maxim-ic.com/app-notes/index.mvp/id/763
I guess the transmitter has to send out a unique identifier and a command (either report switch state or turn on LEDs), then wait for a response, and repeat for all terminals.
Would this sort of system normally require error correcting codes or checksums, or would it work reliably without?
 

MrChips

Joined Oct 2, 2009
30,824
Would this sort of system normally require error correcting codes or checksums, or would it work reliably without?
Both ways can work. I have seen systems work reliably without checksum.
It does not hurt to include a checksum.
I have a very simple and efficient protocol that I can share with you once we learn how the OP wants to handle this.
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
No ..problem .MrChips.. I don't get offended easily. If I do not understand, I ask.

At beginning I thought this would be easy when I discussed it with the party. But as you said when distance is included in data signal it get's complicated.
Making a prototype will make this possible for further sales.

This thing was deemed impossible from a lot of parties from this side u know, hence I took the challenge. I have a feeling this would make a good income. And I am willing to give a out a percent of each unit sale to those who have helped from my cut.

To make a prototype I am spending, if it goes through, I have no doubt it will come back 1000 fold. So I ask those helping me to bear with me.

I will take responsibility with the components. All I need help with is the software part and Ideas.

So what do I have to start with. Keep me posted guys.

Both ways can work. I have seen systems work reliably without checksum.
It does not hurt to include a checksum.
I have a very simple and efficient protocol that I can share with you once we learn how the OP wants to handle this.

I am good to go...

Just please explain me ur terms.
And what things would you need from my part to get this going.
Everything and anything, I need to know.

Meaning, do I need a patent. Mind you patent does not yet apply here, but there is a bill already in debate about copyrights. I think it will pass in due time. I need to know what I have to go through with this sorta thing.

MrChips, I think if I were to go with ur idea as building this modular, I need to know the expense I have to bear with. U should know that these kinda things in Maldives is hard to do as parties will not bear expense if they see that this is not doable.

And many have already decided that is not possible for any one here and if they do not see a working one anywhere they will not even think of implementing such in their business.
 
Last edited:

thatoneguy

Joined Feb 19, 2009
6,359
So I understand this correctly, I have a question on the terminal (3 button box) side.

There are 3 buttons, when any one of them is pressed, it sends a signal to the main processor, and that keypad will not accept any other button presses for 10 seconds.

Does it matter which of the 3 buttons is pressed for the signal and lockout delay to occur?

I'm assuming the 3 buttons each send a different signal, so if these are "typical factory workers", I'd strongly suggest LED Feedback to let them know the button press was recognized, maybe keep the LED on until the 10 second delay is over.

All terminals would need to be continually polled for a button press, would a button press on any other terminal lock out the any buttons other than all the buttons on the terminal where the button was pressed?

What confused me is where you stated the terminal ID didn't need to be logged. How would the master controller count presses from each terminal if the terminal ID wasn't logged?

With that info, a pretty good idea for design can be made.
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
@thatoneguy
So I understand this correctly, I have a question on the terminal (3 button box) side.
There are 3 buttons, when any one of them is pressed, it sends a signal to the main processor, and that keypad will not accept any other button presses for 10 seconds.
Definitely a must

Does it matter which of the 3 buttons is pressed for the signal and lockout delay to occur?
Any one of them lock out the rest in that terminal

I'm assuming the 3 buttons each send a different signal, so if these are "typical factory workers", I'd strongly suggest LED Feedback to let them know the button press was recognized, maybe keep the LED on until the 10 second delay is over.
Outstanding Idea, definitely we should implement it

All terminals would need to be continually polled for a button press, would a button press on any other terminal lock out the any buttons other than all the buttons on the terminal where the button was pressed?
Controller should monitor all the terminal continuously thru out the session.
By session I mean say from morning 800Hrs to evening 1600Hrs. session logging complicates things I presume, so time logging can be omitted but if possible this would give a huge bonus on the prototype.

A power off must halt the polling and memorize the current count but when power returns a resume key should be implemented to continue the terminal polling.

Controller must lock out the remaining switches on that specific terminal only.

It is likely that more than 1 terminal is activated at once. Even then the controller should follow this rule.
"Lock the rest of the keys specific to that terminal respectively. it should leave the keys unlocked in any inactivated terminal
What confused me is where you stated the terminal ID didn't need to be logged. How would the master controller count presses from each terminal if the terminal ID wasn't logged?
I believe terminal ID idea is necessary so the table registry will not get confused.

With that info, a pretty good idea for design can be made.
It did mate :)
 
Last edited:

thatoneguy

Joined Feb 19, 2009
6,359
@thatoneguy


It did mate :)
Yeah, I pretty much have a solution except for the bus particluars. The race condition from two terminals activated at once isn't really a race condition since they are polled, and terminal ID's are kept.

The hardest part on this will be "typical factory worker" proof enclosures and buttons, seriously. Even those indestructible arcade game like buttons would probably get broken somehow.
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
Yeah, I pretty much have a solution except for the bus particluars. The race condition from two terminals activated at once isn't really a race condition since they are polled, and terminal ID's are kept.

The hardest part on this will be "typical factory worker" proof enclosures and buttons, seriously. Even those indestructible arcade game like buttons would probably get broken somehow.
For worn out parts, I guess I'll have spares fro that.

OK, here is my i pence worth.

How about we start with the terminal.
Can we make a working PCB first with MrChips guideline.
 

MrChips

Joined Oct 2, 2009
30,824
R!f@@
Firstly, I couple of things need to be taken care of. I had suggested that you decide if you want to put this in the public domain or make it proprietary. If the latter, you have to take this offsite to a private site.

Secondly, I am a systems person. I have not seen you define the purpose and objectives of this project. I need to see the complete big picture. I am a top down designer. Again, for this I suggest you move to private disclosure.
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
There are things that I can put on public domain.
For eg: My Power supply or Engraver.

This thing is a cousin's idea, his dad is one of the leading or say richest guy here. I am making this for him, but for me there is a big profit margin if this take off. My profit is I get to make this. His profit is that he sells and market it.

So you tell me what I am suppose to decide.
I cannot give out the software out yet.

Let me tell you something about Maldivians. These buggers are basically copy cats and very good at that. They would try to steal first, if they can't they will make it and try to ruin others. What ever it takes they will do it just for the fact to show tht they could do it better. It's sort of pride thing and I wish they would end up in hell for that.
So called freakin' Muslims.

If I am here, others will be here. But they dare not come clean and challenge me, cause they know they can't. You can find a programmer, and you can find hobbyist dealing with simple circuit making But I guarantee you tht you will never find one like me who deals with everything from Maldives that is not a close friend of mine. And my friends won't steal my work atleast not if they have a heart. Cause you can't tell completely ...no..
The best Maldives has to offer is my mentor. And he is in UK right now,but even he is amazed personally seeing my repair skills. Which is something I learned my self. The methods I use to get the job done.

As for this project, I want others to learn but they had to take ideas from this and built there own, not duplicate it.

If I post the software together with schema then I am encouraging them to copy it. it won't help in learning it
But I can take away the software which I believe is the most difficult part.
I am have no objection in showing the schema which I believe I will be designing most part.
I guess this is enuf to anybody trying to learn.

Chips, PM me the guidelines first, or if you don't mind post it.
 
Last edited:

MrChips

Joined Oct 2, 2009
30,824
R!f@@, what time is it now in Maldives? Don't you ever sleep?
Ok, I don't think you understand.
"Public domain" means telling the whole world what you are doing.
So, do you want to reveal your secret to every one so that they can copy?

A design can cost anywhere from $200 to $50,000. I had a company quote me $20,000 to implement USB on a system. I did it myself with a $3 chip. Another company wanted $5000 to make a PCB so I ended up doing it myself.

My services are "pro bono publico" meaning I do it for free. I do not take or expect anything in return.

There are lots of young engineers on this site who can learn by observing how to put together a good systems design. However, I respect that this is your idea and you may well wish to retain the IP (intellectual property).
As I have said, you have told us enough already. Do you want to close this thread and go private or do you want to continue and let everyone in on your secret?
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
R!f@@, what time is it now in Maldives? Don't you ever sleep?
Umm!! it's 2 in the morning or midnight.
And no I do sleep, just not like a normal human being. If I am charged I'll be at it 24/7..right now I am charged. :D


"Public domain" means telling the whole world what you are doing.
So, do you want to reveal your secret to every one so that they can copy?
I know what is public domain. I don't care if they copy or not, but they cannot copy what I don't show them ..


My services are "pro bono publico" meaning I do it for free. I do not take or expect anything in return.
To tell u the truth, I some what misjudged you. for that I am sorry, So please, welcome to the family. :D


There are lots of young engineers on this site who can learn by observing how to put together a good systems design. However, I respect that this is your idea and you may well wish to retain the IP (intellectual property).
As I have said, you have told us enough already. Do you want to close this thread and go private or do you want to continue and let everyone in on your secret?
I like you, for the fact tht you are direct. My kinda guy.
Let me tell you that I did not mentioned before how I ended up here.

My Very first thread was about a the same. A project I got from a party whom dealt with the Police here.
It was a PIC based flasher. So many wanted to do it and so many tried yet no one can time the flasher accurately..like I said there are programmers and circuit makers. But there are non who is making the circuit and trying to program it. ( I wish they would come out so we can make this a better place ).

It wasn't a PIC based before. I did it using 555. But I knew that I cannot get accurate timing over 30 of them using caps as timing devices.
So I googled and came to know about PIC's, AVR's etc.
Now I need to learn to do this I and I did not had time then.
Googling also brought me here, I did went through a lotta sites and forums then who helps a lot and AAC stood out like sore thumb to me. I mean I found the replies and senior member replies to be of Value. So I joined and asked for a simple PIC code to do a two port flash code.
Funny thing happened as I understand now that I did not get a positive reply. I did figured that the code is really simple for a programmer of the sort and it really was nothing indeed when I learned to use assembly.
Since you asked when do I sleep. I should say even that day I was up for 36 hrs and I got really irritated or something that got back in to the forum and I gave what for....and I really am sorry for that, cause AAC helped me with that job and did not ask anything in return. I made one hell of paycheck with that project. So I said to my self, I shall try my best to give back what AAC had given me, and ever since I am here.

That job too was a secret and I tried to keep the software part out of the public but that member knew that it was stupidly simple thing so he kept it in the forum for all to see.

So I am asking, Why can't I just keep the codes hidden for the time being.
When I gain enuf profit I will share the code with all.
 
Last edited:

MrChips

Joined Oct 2, 2009
30,824
Aha! Writing code is the easy part. Many folks can do that. Designing the code is the difficult part. Don't worry about keeping the code secret. Code will be given to who ever is programming the chips. In fact, that is not even necessary. We can give hex codes.

There is a lot more work to be done before we start writing code.

My question is, when we begin the design, do you want all of AAC and the rest of the world in on this? I am not going to proceed until you decide.
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
EH! Why are u confusing me.....

I don't mind AAC being here but the rest of the world is too much for me..
 
Top