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
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

  • How to power up two stereo audio amplifiers from a single source of power supply August 13, 2022
  • WXmeteo in APRS at 144.8MHz project schematic question August 13, 2022
  • uc3843 Buck-boost August 13, 2022
  • Add a low power indicator LED August 13, 2022
  • ESP32/Arduino OTA problems August 13, 2022

Stay Up To Date

Newsletter Signup
EngineersGarage

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