+ Post New Thread
Results 1 to 9 of 9
  1. #1
    Newbie level 3
    Points: 260, Level: 3

    Join Date
    Aug 2011
    Posts
    4
    Helped
    0 / 0
    Points
    260
    Level
    3

    Pic16f877a+uart+max232+rs232 work in simulation and dosnt work in real

    i have problem about connect PIC16F877A with pc
    when connect microcontroller to pc using serial port and max23
    received zero
    and when i send any char received zero too
    hex works in proteus (send and receive)
    and microcontroller works
    and max232 works too

    This is the full code just to test
    Code:
    void main()
    {
    USART_init(9600);
    trisb=00000000;
    portb=00000000;
    while  (1)
              {
              portb.f0=1;
               if (usart_data_ready()==1)
                  {
     
                     if(usart_read()=='1')
                    {
                         usart_write('A');
                      }
     
                  }
            }
     
     }

    In real mode


    In simulation mode

    Use JDM Programmer





    Use MAX232
    (MAXIM) MAX232EPE

    •   AltAdvertisement

        
       

  2. #2
    Newbie level 3
    Points: 567, Level: 5

    Join Date
    Jan 2010
    Location
    indore
    Posts
    4
    Helped
    0 / 0
    Points
    567
    Level
    5

    Re: Pic16f877a+uart+max232+rs232 work in simulation and dosnt work in real

    Hi,

    also face this problem, till now i didn't get any solution.....



  3. #3
    Administrator
    Points: 69,512, Level: 64
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    bigdogguru's Avatar
    Join Date
    Mar 2010
    Location
    Southwest, USA
    Posts
    9,832
    Helped
    2359 / 2359
    Points
    69,512
    Level
    64
    Blog Entries
    4

    Re: Pic16f877a+uart+max232+rs232 work in simulation and dosnt work in real

    Are you using the MikroC Compiler?



  4. #4
    Newbie level 3
    Points: 260, Level: 3

    Join Date
    Aug 2011
    Posts
    4
    Helped
    0 / 0
    Points
    260
    Level
    3

    Re: Pic16f877a+uart+max232+rs232 work in simulation and dosnt work in real

    yes .. use MicroC



    •   AltAdvertisement

        
       

  5. #5
    Administrator
    Points: 69,512, Level: 64
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    bigdogguru's Avatar
    Join Date
    Mar 2010
    Location
    Southwest, USA
    Posts
    9,832
    Helped
    2359 / 2359
    Points
    69,512
    Level
    64
    Blog Entries
    4

    Re: Pic16f877a+uart+max232+rs232 work in simulation and dosnt work in real

    I was afraid you were?

    If the program performs as expected in Proteus, but not in the physical circuit, it is most likely an issue with configuration bit/fuse, clock frequency or some other settings.

    What version of MicroC and PICFlash are you using?

    ---------- Post added at 18:48 ---------- Previous post was at 18:45 ----------

    Looking back over the thread, I just notice your were using a JDM programmer. Does this require the use of a separate GUI programmer interface other than PICFlash?



  6. #6
    Newbie level 3
    Points: 260, Level: 3

    Join Date
    Aug 2011
    Posts
    4
    Helped
    0 / 0
    Points
    260
    Level
    3

    Re: Pic16f877a+uart+max232+rs232 work in simulation and dosnt work in real

    Version: 8.2.0.0
    PIC16F877A



  7. #7
    Administrator
    Points: 69,512, Level: 64
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    bigdogguru's Avatar
    Join Date
    Mar 2010
    Location
    Southwest, USA
    Posts
    9,832
    Helped
    2359 / 2359
    Points
    69,512
    Level
    64
    Blog Entries
    4

    Re: Pic16f877a+uart+max232+rs232 work in simulation and dosnt work in real

    Quote Originally Posted by Cry Heart View Post
    Version: 8.2.0.0
    PIC16F877A
    Ok,

    Does the JDM Programmer require the use of a separate Programmer GUI Application?

    This maybe your problem.



    •   AltAdvertisement

        
       

  8. #8
    Newbie level 3
    Points: 260, Level: 3

    Join Date
    Aug 2011
    Posts
    4
    Helped
    0 / 0
    Points
    260
    Level
    3

    Re: Pic16f877a+uart+max232+rs232 work in simulation and dosnt work in real

    Designed the program already in vb.net



  9. #9
    Administrator
    Points: 69,512, Level: 64
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    bigdogguru's Avatar
    Join Date
    Mar 2010
    Location
    Southwest, USA
    Posts
    9,832
    Helped
    2359 / 2359
    Points
    69,512
    Level
    64
    Blog Entries
    4

    Re: Pic16f877a+uart+max232+rs232 work in simulation and dosnt work in real

    How are you setting your configuration bits/fuses? When using MicroC this is usually accomplished by settings in the PICFlash Utility. I believe the clock speed is also designated at that point as well.

    By the way, Proteus does not require most of the settings to successfully simulate the code. This may account for your application running in Proteus and not in physical hardware.



--[[ ]]--