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

 when i loaded my code, when

|

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

May 17, 2012 at 10:50 am #7843
Anonymous
Guest

 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

  • 1.1kV Cockroft-Walton 200J Capacitor Charger December 4, 2025
  • Samba ( not the dance) December 4, 2025
  • mechanism to shutdown feeding when sensor temperature rises December 4, 2025
  • Looking for a ~1″ Analog CVBS Micro-Display — Any Sources? December 4, 2025
  • Annex32 Basic for ESP Micros December 4, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 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