PIC 16f877 rs 232

Hello my friends!

I m working with pic 16f877A, and I want to do (rs232) data acquisition in labview!

I want to read adc 0 to 5V and view it on a chart.

I m using an example of mikroC:

/*
* Project name:
ADC_USART (data transfer on serial port ADC)
* Copyright:
(c) 2005 Mikroelektronika.
* Description:
The code performs a conversion of AD and send the results (upper part 8 bits) through the
USART.
* Test configuration:
MCU: PIC16F877A
Dev.Board: EasyPIC3
Oscillator: HS, 08.0000 MHz
Post modules: -.
SW: mikroC v6.0
* NOTES:
None.
*/

temp_res short unsigned;

Sub main() {}
USART_Init (9600); Initialize USART (9600 baud, 1 stop bit...

Select Vref and analog, to be able to use ADC_Read
ADCON1 = 0; All pins of porta as analogous, VDD as Vref
TRISA = 0XFF; PORTA came

{}

Reading ADC results and send the high byte via USART
temp_res = ADC_Read (2) > 2.
USART_Write (temp_res);
} while (1); endless loop
}

I know that in terminal mikroC, I can see data communication, but I Don t have any instance on labview to work!

can anyone show me any example labview or, as well as a better pic program?

Thank you very mutch.

jimboli wrote:

I know that in terminal mikroC, I can see data communication, but I Don t have any instance on labview to work!

can anyone show me any example labview or, as well as a better pic program?

You searched by examples? NEITHER comes with examples of serial port. Since you send just a single byte of data, you need to configure the serial port to disable the stop character and set playback VISA to read as a single byte. For example Cory gave, this means a fake of wiring at the entrance to "Activate the tank of termination" and a 1 wiring at the entrance to the VISA reading "number of bytes. I also suggest using a waveform instead of a graph chart. In this way, that you don't need e shift register or build the Array function.

Tags: NI Software

Similar Questions

  • Why I can't install the latest version of Adobe Flash Player on Firefox 18.0.0.232?

    I tried and tried to get the latest version of Adobe Flash Player on Firefox, but it won't take. Tried through update on the plugin page, tried through the Adobe Web site and still no luck. I listed 18.0.0.232 version on my desktop, but it does not appear on Firefox. Anyone has an idea why not?

    You can download the 18.0.0.232 version here.
    https://www.Adobe.com/products/flashplayer/distribution3.html

    Desinstaller.209 and then installer.232.

    BTW, Firefox needs a different version of Flash that IE uses and different from the one that use Chrome.

  • I go to a site, a new window opens, I am warned against a virus and sindou a # 1-855 = 232-1535 for instructions. Is - is this legitimate?

    I go to a site and do a search for an mp3 player. A new window opens and I get a recording of the voice tells me I have a virus and I need to call this number 1-855-232-1535 and I will be given instructions on how to to remove the virus or my personal information could be compromised... My antivirus can't find no viruses nor did my malware program. Is a warning and a number legitimate (I called and had someone who doesn't tell me just who the support she represented and was obviously, probably in India and Pakistan and also of course in a piece of phone). Any comments would be appreciated.nI running windows xp service pack 4 and FireFox 38

    Hi, probably the site it is a phishing site, forge, if you are looking for the virus and you are clean, if you want to check more then, you can try these free programs to search for malicious software that work with your existing anti-virus software:

    Microsoft Security Essentials is a good permanent antivirus for Windows 7/Vista/XP, if you do not already have one. Windows 8 already has integrated antivirus.

    https://www.Google.com/SafeBrowsing/report_phish/

    Thank you

  • 12 pics of the Firefox processor

    Pics of the uncontrollable processor because of Firefox. I just read the pages of text (documentation), all the computer is running at 2% cpu and occasionally firefox uses 100% of CPU for 10-15 s. very unpleasant. Cooler to become noisy, I check the Task Manager to see what is happening... This takes place every 10 minutes, I'd say.

    Add - ons:
    Adblock Plus, the default options, do its job.
    DownloadThemAll! -default options, very rarely used.
    Firebug - inactive for all sites.
    Flashblock - options by default, do its job.
    Session manager - unused (no AutoSave, nothing).

    Plugins:
    Adobe Acrobat.
    Java Deployment Toolkit.
    Java Platform SE.
    Shockwave Flash.
    Shockwave for Director (he keeps to himself).
    Windows Media Player plugin DLL.

    All up to date.

    Looks like this: https://support.mozilla.org/en-US/questions/926601?e=es & as = aaq

    OK I got rid of the scary Shockwave for Director (from Control Panel > Add / Remove Programs > Shockwave > delete). I'll see now.
    I've also got rid of Windows Media Player plugin, using the https://support.mozilla.org/en-US/kb/troubleshoot-issues-with-plugins-fix-problems?redirectlocale=en-US & redirectslug = Troubleshooting + plugins #w_manually uninstalling a plugin

    He did not, once again. Now I'm worried about security, as Shockwave was apparently not sure because it was not up to date. I remember that I disabled it, but it has been activated. In addition, he did not automatically check for updates like the addons.

  • My base pic watch tracks body temperature. Should be included in the list of applications to receive this data.

    My base pic watch tracks body temperature. I wish that she shared with the application of health. Please update.

    Thank you!!

    There is no point in telling other users, which is what you will find in this forum. To contact Apple using http://apple.com/feedback.

  • Satellite L10-232: black screen after closing the lid.

    Hello

    I moved my laptop (satellite L10-232) in another room, it wasn't stop (just closed it). When I opened it there was nothing on the screen and the battery is not empty (processor still does some things). Anyone know how I can fix this problem?

    Thank you

    Easy...
    PowerManagement is weaker and less stable features on any laptop. (especially with the defective batteries).
    NEVER try to count on the home screen etc. It will work time 999 and 1000 it don't.
    Now, you're done with a laptop computer hanging.
    The ways:
    1. the easy way:
    -push the power button and keep your finger on it for 10 seconds. (5 is enough, 10 to be sure)
    -remove the battery
    -plugin powercable
    -push the powerbutton

    2. the less gentle way:
    -remove the power cable
    -Remove the battery
    -wait 24 hours
    -Insert the power cable
    -push the power button

    3. the hard way: make sure THAT YOUR HARD DISK IS NOT PASSWORD PROTECTED, to OTHER YOU LOOSE YOUR DATA.
    trying to understand hat is the startup key sequence to reset the BIOS at startup. (it should be described in your manual somewhere)

    4. the hardest way:! ONLY BY A PROFESSIONAL!
    IF MAKE SURE THAT YOUR DISK IS NOT PROTECTED BY WORD, OTHERWISE YOU LOSE YOUR DATA.
    The laptop must be open and all batteries must be removed. All the capacitors must be emptied (leaving a laptop without the battery for 72 h). Then turn on
    the laptop.

    Please note that I can't be held responsible for any damage or loss of data under any circumstances.

  • Toshiba e-Studio 232 sharing with Vista

    Hi, new to the forum, but it is a great resource.

    My problem is the e-Studio 232 Toshibe printer/copier/fax.

    Basically the problem must connect the scanner (SCAN) printer vista shared folder.

    XP is not a problem, but on the same network vista clients get one is not allowed to conect error.

    I guess it's down to strick lanman v2 Protocol vista uses, but after changing the local
    policy LanMan under vista, I get the same refusal of connection.

    Pointers would be apprecieated.

    Concerning
    MAX232.

    Hello Max

    Sorry, but I think you're wrong here. This forum deals with mobile computing and as you can see there is no section for other Toshiba products.
    Maybe you should talk with your local dealer. They should have experience with the products they offer to customers.

  • Re: upgrade Satellite A100-232 memory

    I want to be as sure as I can be, I already bought memory from Crucial - it does not work... so I want to be sure that I understand the next time.

    Satellite A100-232, currently has 512 MB - I believe that I can go up to 2 GB and understand that 2 x 1 GB is better than 1 x 2 GB - is this true?

    Next - WHO? memory - based on a search on their site, I bought 2 x 1 GB sticks of Crucial, they advised DDR2 PC2 5300 and it did not work. Despite repeated emails, they insist that these sticks are the 'replacement' for DDR2 PC2 4200 (who is now strongly indicated to me according to my recent research such as correct memory - part # PA3411U-1M1G).

    If I buy now 2 x 1 GB - DDR2 PC2 4200 (from a different supplier of course) will I do the right thing? Assuming that the new work of memory, I get in touch with Crucial for money (of course).

    > Satellite A100-232, currently has 512 MB - I believe that I can go up to 2 GB and understand that 2 x 1 GB is better than 1 x 2 GB - is this true?

    You can upgrade the RAM to 2 GB and generally, you must use 2 x 1 GB RAM 533 Mhz.
    In my case, a big module was not recognized. I had to use 2 x 1 GB of RAM, but I put t have this template.

    I recommend using brand modules; Kingston is good and provides good quality modules.
    Different manufacturers provide less expensive modules but the performance and the quality is not really good.

  • M40-232 and ati x 600 128 MB video ram

    I have a toshiba satellite m40-232 with graphics card ati x 600, ati x 600-128 MB dedicated od ram and 128 MB of system ram but I only dedicated. Where can I select o use also system ram? Thank you

    Hello

    This made graphics card supported memory really and has a 128 MB DDR chip.
    It s not a shared memory. But nevertheless as far as I know in the BIOS, you can find the settings AGB. Here, you can change the settings too.

    Good bye

  • Question about port RS-232 on a Portégé R400

    Hi all!

    I have a question...

    In a few days, I will got new laptop of society. It will be Portege R400.

    Sometimes I have to use port RS 232 for connection with inverters and of the PLC.

    Could someone recommend me some RS232 adapter that works good?
    Maybe it's in the offer from Toshiba?
    I think that PC card adapters are better than USB...

    (Sorry for my English...)

    Hello

    Check this box [link: http://sewelldirect.com/quatechrs232serialpcmcia.asp?adpath=/Overture/Overture%20US/Cameron%20Postelwait/Serial%20PCMCIA%20Card&keywords=serial%20pcmcia&ma tch = 1 & utm_source = yahoo & utm_medium = cpc & to utm_term = ser ial % 20pcmcia & to utm_campaign = cp_serial_pcmcia & p cmcia % 20serial = OVRAW & to OVKEY = pcmcia % 20serial & to OVMTC = standar d & to OVADID = 542446012 & OVKWID = 2794282012] for a pcmcia-to-serial adapter. These cards are expensive, but they do their job. :)

    Welcome them

  • Problem with MAT * a feature UJ - 831S on Satellite M40-232

    Hello

    I have a problem with the CARPET * a DVD-RAM UJ - 831S (firmaware 1.40 / Microsoft 5.1.2535.0 driver) installed on an M40-232... reading and writing on CD - R, CD - RW, DVD - R, DVD - RW does not work.
    If I use an original disc it works well (for example, music, and movies on CD and DVD software)

    Any idea on the problem?

    Thank you
    Alberto

    Hi Alberto

    In my opinion, this question needs complex test procedure and if you hope to have a quick fix and easy you are wrong.
    No one knows which blank media you are using. Is it some without name or product of high quality, what type of data is stored on writable media, record the option is enabled, you have tested with burning as NERO software and so on.

    At the end you can backup all your data and install OS using delivered the recovery media. If the problem persists, it may be hardware problem.

    Sorry, but it's really not easy to give a precise diagnosis here.

  • Send to Pc for repairs; must remove iCloud pics to pc, but not iPhone

    I'll send in your PC for repair. They said remove all personal data from Pc. My photos are stored in iCloud flow. What is the process to remove iCloud pics to Pc? I'd like add the iCloud photostream as soon as I get the PC came back to me and I don't want to lose one of the photos. Do I uninstall iCloud and also remove the photostream iCloud computer times? ICloud photos will remain on my iPhone? Thank you

    You can just disconnect from the iCloud Control Panel.

  • RS-232 different speed on console vs window

    I have a simple application that I made to test the flow of data from a device.  I had trouble with slow communications with another program, so I wrote this one to test only RS-232 communications. My problem is that I get the result differs depending on whether I have compiling the program as a console application or a windowed application.

    My device sends packets of 70 bytes message at 100 Hz using 460800 baud, 8-N-1.  I use a USB adapter for series, which is supposed to support the baud rate.  Using the console application, I get about 7 000 bytes per second, which is what I expect.  However, when you run a windowed application, I get about 34 bytes/second.  Anyone got any ideas on why there is such a big difference?  (CVI 2013 on Win7)

    Code is below.  I use the inputs are: [COM port number], 460800, 1.



    int main)
    {
    FILE * outFile;
    FILE * binFile;
    int iNumBytes = 0;
    char cMessageArray [720];
    Secret int;
    int iPortNum;
    long lBaud;
    int iByteRead;
    int iGetRate;
    char cFileName [20];
    time_t timeStart;
    time_t timeStop;
    long lByteCount = 0;
    long lTimeoutCount = 0;
    long lNumSeconds = 0;

    printf ("recorder Port. ") \nWrites bytes received on the port selected in a file ({Port #} .txt) .\n\nEnter COM port: ");"
    scanf ("%i", & iPortNum);
    printf ("\nEnter baud rate:" "");
    scanf ("%u", & lBaud);
    printf ("\nEnter 1 just calculate the byte rate:" "");
    scanf ("%i", & iGetRate);

    printf ("\nListening on the port %i to baud rate %i (8-N-1) w/half second timeout. ") Press any key to stop. \n", iPortNum, lBaud);

    DisableBreakOnLibraryErrors();

    Secret = OpenComConfig (iPortNum, "", lBaud, 0, 1, 8, 8192, 1024);
    SetComTime (iPortNum, 0.5); COM read the time-out in seconds

    <= istatus="">
    {
    Open output files
    sprintf ('% u.txt', cFileName, iPortNum);
    outFile = fopen (cFileName, 'wt');
    sprintf ('% u.bin', cFileName, iPortNum);
    binFile = fopen (cFileName, "wb");

    time (& timeStart);

    If (1! = iGetRate)
    {
    While (!.) KeyHit())
    {
    iByteRead = ComRdByte (iPortNum);

    If (-99! = iByteRead) / / IF not a timeout
    {
    iByteRead = iByteRead & 0x00FF;
    fprintf (outFile, "%.2X", iByteRead);
    printf ("%.2X", iByteRead);
    cMessageArray [iNumBytes] = (char) (iByteRead & 0x00FF);
    iNumBytes ++;
    lByteCount ++;

    If (70 is iNumBytes)
    {
    fwrite (cMessageArray, 1, 70, binFile);
    iNumBytes = 0;
    printf ("\n");
    }
    }
    on the other
    {
    fprintf (outFile, 'TIMEOUT');
    printf ("TIMEOUT");
    lTimeoutCount ++;
    }
    }
    }
    on the other
    {
    While (!.) KeyHit())
    {
    iByteRead = ComRdByte (iPortNum);

    If (-99! = iByteRead) / / IF not a timeout
    {
    lByteCount ++;
    }
    on the other
    {
    lTimeoutCount ++;
    }
    }
    }

    time (& timeStop);
    lNumSeconds = timeStop - timeStart;

    printf ("bytes = %i seconds = %i bytes/s = %f\nTimeouts = %i\n", lByteCount, lNumSeconds, (float) ((float) lByteCount / (float) lNumSeconds), lTimeoutCount);

    fflush (outFile);
    fclose (outFile);
    CloseCom (iPortNum);
    }
    on the other
    {
    printf ("cannot open the COM port.");
    }

    printf ("\nPress any key to close. \n ») ;

    GetKey();

    While (!.) KeyHit())
    {}

    return 0;
    }

    Thank you!

    Your program GUI can be affected by the CVI political intelligence defined in the environment options.

    I seem to remember that the value default for this setting is to sleep more, which means THAT CVI give much time to the operating system to serve other tasks or programs. You can try with some sleep or not sleep; in the latter case, don't forget to insert some ProcessSystemEvents somewhere in your application to allow to honor events of UI in the case otherwise you will not be able to exit the loop.

    The same option can be set programmatically by calling SetSleepPolicy)

  • With 232/16 PCI driver problem

    I had a hard drive failure on a machine that communicates with several robots using RS232 and have the old PCI-232/16 186492 B - 01 Board I am getting down to work. This is not the most recent of the PCI-8430/16. He has worked previously on Windows 7 but now I can not for the life of me find the windows drivers. This machine is before my time here at the company so I have mentions on the old installation. Same computer, but with a new drive, new install Win 7 and LabVIEW 2016. I don't know that the previous version of LabVIEW has been 2014. The only way that I can not find is to intall OR Serial XX. I installed 15.0 NOR-Serial, but it may lack the suitable driver for the PCI-232/16? Note that registration on the Web page for NOR-Serial 15.0 lists PCI 232/16 in the list of devices. Maybe I do not a good thing to get the driver for this device windows? The other option is to replace the card with a serial port external USB multi adapter - there is another similar fixture who has this road and I know I can get this to work.

    Make sure that the device is associated with the NOR-Serial driver in Windows Device Manager. Pilot tab in the Properties window should list National Instruments as the driver provider.

    If it isn't, you will need to update the driver manually. The driver should be placed at the C:\Windows\System32\drivers\NiSerU.sys

    If it still does not work, you might want to try the device in a different PCI slot.

  • Connection of agilent E3631A DC power supply to the computer via a RS 232 for labview

    Im trying to access the computer via a cable RS 232 for sully power DC E3631A agilent use labview to operate the instrument. But the instrument is now detected by the computer and when I check instruments instruments connected tools-tool-find, told me no device not connected. I tried to use max by changing the configurations, but so far it doesn't work anymore. Please can someone tell me what to do

    I don't know if MAX is the instruments of automatic detection on the serial port.  You can contact the instrument using Hyperterminal or something like that?  Also make sure you serial port settings are all correct (it is the most common reason).

Maybe you are looking for