Page 1 of 1

data collector & transmitter

Posted: Thu Aug 25, 2011 5:08 am
by nuwan5213
hi all,
this time im going to make data collector via tcpip.
ok ,my modeule has numaric keypad & lcd.what i enterd by using keypad and it must be display to user via lcd and im going to connect this into router to collect data in to pc.my plan is connect 5 or more devices in to router and collect data.
i dont have any experieance about tcpip protocole and need help.what the chip should i use ?
give me the clear idea. :?:

Re: data collector & transmitter

Posted: Thu Aug 25, 2011 10:00 am
by Benj
Hello,

I would have a look through the Flowcode 4 examples these should include examples of how to send and receive data using the TCP/IP E-block. We use a 16F877A on our TCP/IP solution so you could use this device or you could go for a device with bigger memory if you need more functionality or the ability to store a lot of string data etc.

Re: data collector & transmitter

Posted: Thu Aug 25, 2011 12:34 pm
by nuwan5213
Mr benj

Why we cant manual simiulate keypad? Is it impossible (i mean shft+f8).can yot give me an example of two or more number displayed lcd program.
thanks.

Re: data collector & transmitter

Posted: Thu Aug 25, 2011 12:42 pm
by Benj
Hello,

The keypad and LCD components both simulate correctly.

Look in the main Flowcode v4 example download and you will find some good examples.

http://www.matrixmultimedia.com/lc_index.php?p=18

Examples\String Manipulations\4. Inputting a password.fcf

Examples\Components\Keypad\2. Keypad and LCD 16F877A.fcf

Re: data collector & transmitter

Posted: Sun Aug 28, 2011 4:50 pm
by nuwan5213
Hi all,
anyone kindly send me a realtime clock with adjusment buttons.
it will help me a lot.
thanks. :o :o :o

Re: data collector & transmitter

Posted: Sun Aug 28, 2011 6:24 pm
by JohnCrow
There is a digital clock in the flowcode examples folder (Interupts folder)

http://www.matrixmultimedia.com/lc_index.php?p=18

Plus I'm sure if you search the forums you will find more examples.

Re: data collector & transmitter

Posted: Mon Aug 29, 2011 2:42 am
by nuwan5213
hi ,
it desnt help me
i want clock with adjusment buttons.
thanks,
best regards
nuwan :(

Re: data collector & transmitter

Posted: Mon Aug 29, 2011 9:48 am
by medelec35
Hi nuwan,
You have not said how you want to adjust clock. E.g with keypad buttons, directly entering time, or just separate buttons to adjust time.
Here is a clock example that uses two buttons for time adjustement.
http://www.matrixmultimedia.com/mmforum ... 824#p15813

Martin

Re: data collector & transmitter

Posted: Wed Aug 31, 2011 10:53 am
by nuwan5213
hi martin,
this time i modified digital clock to transmitt data measns seconds,miniutes,hours to pc via rs232 also send a unit id why im going to attach several units parallal.also i need to get two digit number to transmitt that was my data also.
can i do this?
i dont build any hardwear for that.
if i connect several unit parallely and recive datas via pc com port possible.?

simply what i want is collect time ,unit id, and two digit data only.i sent unit id every main program cycle to identify the unit is online.
is it going to work.?
give some advices before i build cct.
best regards,
nuwan.

Re: data collector & transmitter

Posted: Sun Sep 04, 2011 1:36 am
by nuwan5213
Jhon,
please findout my flow chart and givr me advice,.
thanks.
nuwan.

Re: data collector & transmitter

Posted: Mon Sep 05, 2011 10:44 am
by Benj
Hello Nuwan,
this time i modified digital clock to transmitt data measns seconds,miniutes,hours to pc via rs232 also send a unit id why im going to attach several units parallal.also i need to get two digit number to transmitt that was my data also.
Do you mean you are going to attach multiple microcontroller UARTs to a single PC RS232 interface. This is likely to fail as if two microcontrollers transmit data at the same time then the PC will receive corrupt data. Even if data is not corrupted by a collision the TX pin is always driving the signal so the microcontrollers would essentially be fighting each other for control of the signal probably leading in damaging the microcontrollers. You could use resistors to circumvent this but the collisions would still be an issue. What would be better is if everything came to a central point before being sent to the PC. A RS485 bus could potentially be used to do this.
http://www.matrixmultimedia.com/article.php?a=419

Alternatively you could use resistors to connect the signals together and then have a pin that tells the other microcontrollers that you are sending data. The microcontrollers must then all check this signal before sending to ensure a collision does not occur.
simply what i want is collect time ,unit id, and two digit data only.i sent unit id every main program cycle to identify the unit is online.
is it going to work.?
One unit: Yes,
Multiple Units: Not directly without some kind of work around for the collision and bus contention problems.

Re: data collector & transmitter

Posted: Mon Sep 05, 2011 10:52 am
by Benj
Here is a basic schematic using the resistor and busy signal method.
ben1.jpg
ben1.jpg (62.67 KiB) Viewed 6995 times
A particular chip will check the RA0 pin as an input. If the pin is high then the chip pulls the pin low before sending the RS232 data. If the pin is low then the microcontroller waits a random amount of time before trying again.

Re: data collector & transmitter

Posted: Wed Sep 14, 2011 6:59 am
by nuwan5213
Hi,

Tnanks ben .i will back to you with results after building cct.
regards,
nuwan.