Comunicacion Visual Basic Puerto Serial Linux

Visual Basic. Hola, necesito ayuda para leer puerto serie de una bascula. Utilizo MSCOMM de VB para el envio y recepcion. En teoria tengo que envia el caracter.
Why are you both setting up the UART yourself (setting the RCSTA etc. register bits) and THEN using the library function to do the same thing. You should do one or the other (and my preference is to NOT use the library routines for the UART - the peripheral is really simple to configure and use and the library functions can really get you confused in other circumstances). Do not enable the UART and then configure it: I have a rule to always configure and then enable all peripherals. Some peripherals on some devices will allow your way but others can get completely confused. You do not need to set the CREN and SPEN bits after each character is received - set them as part of your UART configuration and leave them alone. Also, you are using the PORTB as a single port and not as individual bits (from what I can tell by your code anyway). Therefore, you do not need to set each bit individually - for example, your 'derecha()' function can be simplified to 'LATB = 0x26;' and, as it is now really a trivial statement, you can do this from within your 'switch' statement rather than as a function.
As a matter of interest, how do you know it does '.not get the char'? Have you checked on a scope that the Rx pin is receiving the correct signal? Have you checked with a debugger that your 'data' variable is getting anything at all? Your description of the problem means that we have to guess what is happening (as I have done above) Susan.
Hi, I'm glad to know the package is being useful for you! About the delay, I can think of two main factors that you might be experiencing: (1) SerialCommUnity reads from your device as often as the Update function of your MonoBehaviour is being called. That Update function runs once per frame, so if your program runs at 30 FPS, the library will try to read from your device every ~33ms (1 second/30 fps = 0.033s). I don't know how you are doing your delay measurement, but this is a big factor.
Download windows xp kb922120 v6 x86 enu exel. (2) The default baudrate in my examples is the slowest 'standard' value: 9600. Set it to something like 115200 to increase the communication speed. You will also need to change the baud-rate in your piece of hardware to match this. Why did I default to 9600? Because though it is the slowest, it's the less error prone (there is less chance of bits being flipped because of network errors, and we are talking here at network protocols without error correction). So if you plan to increase your baudrate, increase it to the lowest value you can get off with! And use only the 'standard' values.
Is a list of baudrates and further explanation, in case you are not familiar with the concept. I hope this is useful!
(I copied your question as well because it is a very useful question, and I want other people to find it quickly). Thank you for the serial package. I'm currently trying to use it for my Final Year Project.
- суббота 03 ноября
- 86