Inserting Start bit and Stop Bit in a serial communicatiom

Robin2:
I know it has been frustrating trying to get info from the OP but I don't understand the move here. I thought this area was for people who want someone else to write code for them.

I don't normally read the G&C section.

The OP said recently:

So just help me out with this! Tell me in simple words what needs to be done now? I have provided my code so as its output and all the module details !

His posted code is nothing to do with anything much. It just does a serial read and turns a pin on. It seems to me he is asking people to write the code for him, and thus it is suitable for Gigs and Collaborations.

If the OP makes a bit of an effort to answer questions, I could move it to Project Guidance.

You're right Nick. That is one of the standard ploys I've seen here.
I guess I'm just not used to seeing it handled properly. Good move!

tell me if something is wrong with you guys?
i asked for the help that's it
if you don't know how to help so just keep calm and don't post such words!
Thank you so much all of you.
i was looking for KQ330 data sheet these days long as @robin asked but couldn't found such.
i don't know whats wrong here with you people..

@robin this is the material i found about KQ330 module
Description:

KQ-330F Series performance:

1 small size thick film integrated module Overall dimensions of 33 × 19 × 13 mm (L × D × H), 11-pin single row leads feet spacing of 0.1 inches.

Operating frequency 120 ~ 135KHZ, interface baud rate of 9600bps. Actual baud rate 100bps on 250 byte buffer.

Temperature range: -25 C ~ +70 C Humidity ? 95%

4 Power supply: Imax ? 20mA DC +5 V received ? 12mA

  1. Few and inexpensive external components to be connected directly to 220V AC carrier communication.

Specifications and models:

KQ-330F:

330 after the first letter is defined as:

F: zero crossing transmission type

Other performance See KQ-130F, KQ-130F +

1P-IRX, carrier signal input

2P-AGND, analog signal common-locations

3P-VAD, a 470uF capacitor parallel between the analog circuit power and AGND

4P-VCC, +5 V

The 5P-DGND, digital circuit co-location

6P-RX, the modulation data input, then the microcontroller TXD

7P-GL, zero-crossing detection input, then the optocoupler collector

8P-T1 carrier frequency output

9P-TX, the demodulated data output terminal, connected to the microcontroller RXD

10P-MODE, carrier data mode control

11P-NC

KQ-330F circuits for CMOS type, user Do not plug or unplug when in use, should be anti-static, to avoid damage to the internal chip. Welding should use anti-static electric iron.

AGND and DGND by the user in the external wiring connected at one point T1 provides maximum 20mA load drive capability.

I would much prefer if you post links to documents rather than transcribe them - with a risk of errors.

You have not said whether the diagram I included in my earlier post is correct?

The kq330 seems to be part of the device in the link you posted in Reply #28. Are you using the board in Reply #28 or are you using the "bare" kq330?

What is the purpose of the additional components on the board?

The problem I have is that you have not produced a document that explains how to use it. In the absence of such a document I can only assume that it works with simple serial reads and writes. But remember, if it only conveys data from one device to the other at 100bps there will be a considerable delay between sending and receiving compared to transmission at even 9600baud.

One problem with not having a datasheet is that we don't know how to detect whether a byte has been received, or whether you need to wait a bit longer.

Maybe the answer is to buy a device for which you can get a datasheet.

...R

surajveer37:
i don't know whats wrong here with you people..

You are asking for help with a device without providing much or any detail. It took reply #26 before you even mentioned the device and so far no link to the datasheet.

Your request to "I want to insert a Start bit and a Stop bit in my Data bits." doesn't make any sense because Serial communication already has Start and Stop bits.

Why did you think it hadn't? What tests have you done to indicate this? How is this device wired up? Over what distance? Is this a home project or are you working for a power company?

The only link you provided ( http://digipak.org/zencart/index.php?main_page=product_info&cPath=4&products_id=212 ) does not mention a datasheet.

Assuming that is all we can go on, how have you wired it up? What is your current code? What is the output from it?

If you are asking us to simply write the code for you, then I suggest you offer to pay. Otherwise I suggest you post what you have done so far.

surajveer37:
tell me if something is wrong with you guys?
...
i don't know whats wrong here with you people..

Better read this thread then:

Gambituk:
Thanks for the help and suggestions. I'm not very good at all the coding etc, but i do really enjoy messing around with my arduino's and the support from this community is excellent.

I'll just emphasise that last bit: the support from this community is excellent

So maybe you need to work harder at helping us to help you?

I fully share your frustration. Just don't think moving the project here has alleviated any of it.

It does seem as if the OP is in over his head, or is less interested in his own project than we are.

...R

Without a datasheet, how did you know how to hook it up?
How did you know what protocol to use?
Are you sending data at zero crossing?
Are you receiving data at zero crossing?

steinie44:
Without a datasheet, how did you know how to hook it up?
How did you know what protocol to use?
Are you sending data at zero crossing?
Are you receiving data at zero crossing?

It seems to me the device he is using handles all the electrical stuff and just needs a serial link to the Arduino. But without the datasheet I can't be sure. I think the Thread title is completely irrelevant to the problem.

The OP seems to have abandoned us.

...R

OP acts like a boss or client.

"What is wrong with you people?".

Maybe we've been fired or didn't pass the audition.

GoForSmoke:
Maybe we've been fired or didn't pass the audition.

Didn't want the effin job anyway

...R

I was curious. X-10 is not real cheap.

Here is the kq330f data sheet but dont know how to uplaod it here so here is the link:

Here is a research paper which will help you more than datasheet itself:
https://www.google.com.pk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CBsQFjAA&url=http%3A%2F%2Fwww.eea-journal.ro%2Fincludes%2FshowArticle.php%3FidentificatorArticol%3D461&ei=TwpnVOfAOsfwaPGwgPgI&usg=AFQjCNEj2QJ7GwvzAWP5eigjbNaprTra2g

I have been using the KQ-330 module with great success after a lot of running in circle due to the very limited English Litterature.
KQ-330 is the PLC Modem plus MCU and KQ-130 is the board with al the coupling and filtering component to hook directly to power lines.
Module is taking care of all the encoding and modulation.
Only thing that you have to be careful with is the way you build up your frames since you want to work on with the MODE pin tied down to let the module do all the filtering out.
Frame are :
1 st BYTE : Number of Bytes in the message
Other BYTES : Data
and you receive :
1st BYTE : Nbr of byte in the packet followed by the message.
Xmit and receive buffer is roughly 250 bytes.
One thing to keep in mind is that it is very slow so make sure that you have enough delays between your packets.
One thing I would like to know is the actual distance one can reach, I have read anything from a couple hunderd meters to 1.5 km ???

did you find the solution ?