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 / Replies / when i loaded my code, when i

when i loaded my code, when i

|

Microcontroller › PIC › serial communication using PIC18f4550 › when i loaded my code, when i

May 17, 2012 at 10:51 am #7844
srikanth
Participant

when i loaded my code, when i enterd any character through keybord the output is not in proper format , its giving like this  —

                                                                                                                                                                                           — .

                                                                                                                                                                                           —

 

my code is : #include “C:Program FilesPICCProjectsNew FolderpradUART.h”
#include <stdio.h>
//#include <18f452.h>
#use rs232(baud=9600,xmit=pin_c6,rcv=pin_c7)
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=2000000)

void main(void)
{

unsigned char k;

   setup_adc_ports(NO_ANALOGS);
   setup_adc(ADC_OFF);
   setup_psp(PSP_DISABLED);
   setup_spi(FALSE);
   setup_wdt(WDT_OFF);
   setup_timer_0(RTCC_INTERNAL);
   setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
   setup_oscillator(False);

  while(1)
  {
 k= fgetc();
 fputs(k);
 printf(“41H”);

   // TODO: USER CODE!!
};
}

RSS Recent Posts

  • CR2/CR123A Batteries In Projects February 14, 2026
  • Integrating 0–5V ECU Signals into a Double-DIN Setup – Module vs Custom Head Unit? February 14, 2026
  • Puzzled about a relay February 13, 2026
  • Switch Circut February 13, 2026
  • RC Electronic Speed Control Capacitors February 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