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 / UART simulator MPLAB X IDE

UART simulator MPLAB X IDE

|

Microcontroller › PIC › UART simulator MPLAB X IDE

  • This topic has 0 replies, 1 voice, and was last updated 11 years, 11 months ago by giuseppe.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • March 10, 2014 at 1:12 pm #2937
    giuseppe
    Participant

    Hello, I tried to use the logic analyzer to test the USART module but it does not work.
    So I want to try the uart I/Osimulator on MPLAB X. The PIC is 18F4431. I check enable UART I/O on simulator properties and set window in output field.

    Where is the window where appear the data trasmitted? I don’t find it. I see in the output -> simulator window but is written only this:

     

    <cite>Resetting peripherals
    Running

    Single breakpoint: @0x3F2E
    Running
    Resetting SFRs
    Resetting peripherals
    Resetting SFRs
    Resetting peripherals
    Running

    Single breakpoint: @0x3F76
    Running
    Running
    Running
    Resetting SFRs
    Resetting peripherals
    Running
    Running</cite>

     

    This is the code:

    <code>

    #include <stdio.h>
    #include <stdlib.h>
    #include <xc.h>
    #include <plib/usart.h>

     

    int main(int argc, char** argv) {
        int word = 0b10101010;
        baudUSART(BAUD_IDLE_CLK_LOW & BAUD_8_BIT_RATE & BAUD_WAKEUP_OFF & BAUD_AUTO_OFF);
        OpenUSART(USART_TX_INT_OFF & USART_RX_INT_OFF & USART_BRGH_LOW & USART_SYNC_MASTER & USART_EIGHT_BIT & USART_ADDEN_OFF, 1);

        //ReadUSART();
       
        //printf(“hello”);
        while(1){
            if(TXSTAbits.TRMT==1){
                WriteUSART(word);
            }
        }
        return (EXIT_SUCCESS);
    }

    </code>

    Thanks.

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

RSS Recent Posts

  • Variable audio oscillator February 8, 2026
  • Do i need a buffer? February 8, 2026
  • ANOTHER OLD PROJECT REDO February 7, 2026
  • wall transformer polarity February 7, 2026
  • Supply vs performance query February 7, 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