EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / transmit a character continuously through PIC 16f688

transmit a character continuously through PIC 16f688

|

Microcontroller › PIC › transmit a character continuously through PIC 16f688

  • This topic has 1 reply, 2 voices, and was last updated 13 years, 3 months ago by AJISH ALFRED.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • February 23, 2013 at 6:50 am #2126
    sajjad
    Participant

    hiii

    i have to transmit continuously a character through pic using USART and observe it  on hyper terminal. i am using internal oscillator.

    i am using help  my code is :

     

    void tx_data(unsigned char);
     
    unsigned int i=0;
     
    #define FREQ 8000000    // Frequency = 8MHz
    #define baud 9600
    #define spbrg_value (((FREQ/64)/baud)-1)    // Refer to the formula for Baud rate calculation in Description tab
     
    void main()
    {
        SPBRG=spbrg_value;                                // Fill the SPBRG register to set the Baud Rate
        RCSTA.SPEN=1;                                     // To activate Serial port (TX and RX pins)
      TXSTA.TXEN=1;                                     // To enable transmission
     osccon=0b01110101;                               // using internal oscillator 
      while(1)
        {
            tx_data(‘a’);        // Transmit the same data back to PC
        }
     
     
    }
     
     
    void tx_data(unsigned char data1)
    {
        TXREG=data1;                                     // Store data in Transmit register
        while(PIR1.TXIF==0);                             // Wait until TXIF gets low
    }
     
     
     
    this code is giving output on proteus but not on hardware when i am using MAX232 with terminal.. 
    kindly guide me .
    please tell me the missing or wrong step i am doing.
    thanking in advance 
     

     

    February 24, 2013 at 5:24 pm #9176
    AJISH ALFRED
    Participant

    Please post your circuit diagram.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Replacement IGBT for DGG4015 for Honda Motorcycle ECU June 14, 2026
  • Mitsubishi Electric IPM module lot code format - how to decode? June 14, 2026
  • TDK Lambda ESS 500-20-11-D-LB-RSTL Parallel Operation June 13, 2026
  • Programmable 1kV DC Power Supply – Budget ~$600 with Display June 13, 2026
  • effect of calibration on s-parameters June 13, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise