1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Need help with Intel Assembly Language and PIC16F877

Discussion in 'Microcontrollers' started by avinsinanan, Mar 17, 2003.

  1. avinsinanan

    avinsinanan New Member

    Joined:
    Mar 17, 2003
    Messages:
    22
    Likes:
    0
    Hello,

    A few days ago I programmed the PIC16F877 chip to light a Seven Segment Display. I wrote the code in Assembly Language.

    The Lab I did invloved me typing up the assembly code on my computer and connecting an ICD to the PIC16F877. The PIC16F877 was then connected to the Seven Segment Display. The code worked. I used MPLAB to do the assembly code.

    However I am doing a new experiment where I am using the my computer (an INTEL Processor) to act as the PIC16F877. My computer is to conenct to the Seven Segment Display LCD and control it. It is conencted through the parallel Port.

    I am using Turbo C. How do I approach this? I know some C.

    Could someone advise me on where to start. Where can I get a good beginners tutorial on INTEL ASSEMBLY and Using TURBO C to start.

    Thanks
     
  2. Chippie

    Chippie New Member

    Joined:
    Mar 8, 2003
    Messages:
    991
    Likes:
    9
    Location:
    Good 'ole England
    What you actually need is the code to make the parallel port drive the 7 seg display........there are plenty of resources on the net that explain how to write soft for the parallel port........
     
  3. bogdanfirst

    bogdanfirst New Member

    Joined:
    Dec 13, 2002
    Messages:
    1,310
    Likes:
    1
    Location:
    Ramnicu Valcea, Romania
    but why do you need a PIC to drive it. there are ic's that do that.
    or you need to store something and then show it on the display without the somputer?
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. avinsinanan

    avinsinanan New Member

    Joined:
    Mar 17, 2003
    Messages:
    22
    Likes:
    0

    I don't have a choice

    I have to use the Intel computer processor becasue my lectuerer says i have too.

    PLease help me out.
     
  6. Chippie

    Chippie New Member

    Joined:
    Mar 8, 2003
    Messages:
    991
    Likes:
    9
    Location:
    Good 'ole England
    IMHO, I dont think your lecturer expects you to literally connect up a 7 seg display to you prize pc that is based on an Intel processor........

    Like I said before, perhaps you are going to use the pc, with a suitable program that drives the display as you did with a pic.......but to do this you need some physical means of connecting the display to your pc, this is done via the parallel port........you ned to write a program in what ever language, turbo C in your case, that will enable your pc to drive the display........have a look here: http://www.lvr.com/parport.htm
     
  7. avinsinanan

    avinsinanan New Member

    Joined:
    Mar 17, 2003
    Messages:
    22
    Likes:
    0
    Where can I find sample code?

    Hi thanks for all the help so far.

    Does anyone know where I can find some sample code to do the following -

    Connect the PC to the 7 segment display through the Parallel Port. So that it can display a number? eg Display 5.

    Thanks
     
  8. bogdanfirst

    bogdanfirst New Member

    Joined:
    Dec 13, 2002
    Messages:
    1,310
    Likes:
    1
    Location:
    Ramnicu Valcea, Romania
    well you can use a simple buffer ic like 74240 or 245 or another type because the paralel port cannot hold the current needed for the display.
    as for the software you think what bits you need to be H for the specific number. take the bits and convert to decimal and send that number to the port. done. some spftware can support sending the binary number directly.
     
  9. avinsinanan

    avinsinanan New Member

    Joined:
    Mar 17, 2003
    Messages:
    22
    Likes:
    0
    What kind of software

    Bogdanfirst,

    Ok by software do you mean the CCS complier in MPLAB. That is the software I have. DO you mean that by software?

    If so, it still means I have to configure the Parallel Port. I can'y just sent the binary or decimal numbers over the Parallel prt through the buffer to the 7 segment LED just so. Can I?

    So which means the code to configure the parallel port has to written in C since it is a CCS complier.

    Where can I get the code to just copy and paste? Any sites you know by chnace?

    SOrry for the trouble but my dead line is appraching and I have no prior expierice in this field.

    Thanks
     
  10. isaacj

    isaacj New Member

    Joined:
    Dec 20, 2002
    Messages:
    57
    Likes:
    0
    Location:
    Mojave Desert
    CCS and MPLAB create code that only runs on a PIC. If you want to write a program for a PC using the C language, you need to obtain a compiler for the x86 processor. Gcc and Borland C/C++ are two examples.


    The software bogdanfirst refers to is the program you will write to send data to the parallel port to drive your display.
     
  11. maharajakecil

    maharajakecil New Member

    Joined:
    Feb 26, 2008
    Messages:
    1
    Likes:
    0
    need help on assembly language of PIC 16f877

    helo. i need a PIC16f877 language to control 2 unit of printer motors placed in x and Y axes. this is an application of cutter machine. i already have the hardware but not the software. anybody please help me... i'm using vb as my GUi with serial connection to my PIC circuit.
     
  12. atferrari

    atferrari Well-Known Member

    Joined:
    Oct 8, 2003
    Messages:
    2,816
    Likes:
    121
    Location:
    Buenos Aires - Argentina
    Start a new thread. Is not correct to ride an existing one!
     

Share This Page