[ASK] LCD Display in PIC with C Programming in Ubuntu

Discussion in 'The Projects Forum' started by chichara, Apr 15, 2013.

  1. chichara

    Thread Starter New Member

    Apr 15, 2013
    18
    0
    Hi Everyone :)
    I need your HELP!

    I have a project to display LCD 2x16 with PIC16F877A, and I use linux-ubuntu for programming.
    Since, I'm new with linux, i really don't know how to programming C in linux.
    Can anyone help me how to do it? and Can anyone show me the code?

    Your reply really mean to me.
    Thank you for your reply.

    Best Regards,
    Chichara :)
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    Both MPLAB (the IDE programming environment) and XC8 compiler have version for the Linux OS, and both are free to download.

    There's tons of example code on the web in C for this task.
     
    chichara likes this.
  3. chichara

    Thread Starter New Member

    Apr 15, 2013
    18
    0
    Hi ErnieM, thanks for your reply. :)
    I did it with MPLAB and XC8 compiler, and i made the file.hex, but it can't download to my PIC, so i used picp to download it. But, still can't download to PIC. that error is :
    programmer not detected (CTS is false).
    what does it mean?
    any recommended software to do it?
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    The programmer is a piece of hardware that sits between your PC and the PIC.

    For thew PIC16 you use the PICkit 2 is a good choice.The #2 has been is superseded by the PICkit 3.

    And congratulations for getting MPLAB and the compiler to work. :)
     
  5. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    CTS is one of the lines on the serial port so I guess it's not a PICKIT2 or 3
     
  6. chichara

    Thread Starter New Member

    Apr 15, 2013
    18
    0
    Thanks for the replay. :)

    @ErnieM : If i'm not mistaken of what do you mean, should i use PICkit 2 or PICkit 3 as my downloader? (PICkit2 or PICkit3 is hardware downloader right?

    @Markd77 : i also find in google like you said. some people said that the serial port is the problem. But, i still can't get the point. should i setting something in my linux? or should i change or adding something in my serial cable? or what?
     
  7. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    Ah, found picp:
    http://linux.about.com/cs/linux101/g/picp.htm
    So you have a PICSTART programmer?
    Are you using a PC with a serial port or a USB to serial converter?
    If the former, check that the cable has all pins connected.
    From the error this seems unlikely, but check that picp has access to the serial port or USB port involved. You can change the permissions for whichever "tty" the hardware serial port is in the /dev folder, or USB would be ttyUSB0. Changing to all have read / write access should make sure it's available (the permission will be changed back at next boot up).
     
  8. chichara

    Thread Starter New Member

    Apr 15, 2013
    18
    0
    Sorry just to reply.
    No, I don't use PICSTART as programmer.
    I use PC with USB. I think the problem is in USB port. picp can't access the USB.
    Also, I try to get the permission like u said, using tty or ttyUSB but still can't work.
    Lately, the error said, that my pic is detected as a modem, not programmer.
     
Loading...