EasyPic 6 Mikroelectronika


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1

    Default EasyPic 6 Mikroelectronika

    Does anyone have any experience with this development system using PBP? I am a newbie, and I am trying to use a Pic16F628A to write to the on board LCD screen. It appears to be connected to port B - can't seem to get it to work. Can anyone send a simple sample program that might work?
    Thank you for any help.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,541


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    i have an ep7board it appears to be very similar to a ep6 schematically for the lcd connections. i have experienced no trouble with the lcd. only issue i have using those old style chips is getting the programmer to verify chip. iirc the pgm pin needs to pulled down for success.

    you provide no detail and can't get it to work is pretty vague.
    what have you tried ? and what happens ?
    Warning I'm not a teacher

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    It appears that the LCD is connected to Port B. I think by default the PIC 16F628A uses Port A. I just do not know how to tell the PIC to use Port B. What PIC are you using with Easypic 7? I was hoping someone could send me the pic basic code that would provide me with a simple test.

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    my code looks like this:

    CMCON = 7
    DEFINE LCD_DREG PORTB
    DEFINE LED_DBIT 0
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 5
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2



    PAUSE 1000
    LCDOUT $FE,1
    LCDOUT "HELLO"
    PAUSE 1000

    END

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    oops - correcting a typo and an omission - this is the code that I am trying

    TRISB=0
    CMCON = 7
    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 5
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2



    PAUSE 1000
    LCDOUT $FE,1
    LCDOUT "HELLO"
    PAUSE 1000

    END




    Thank you for any help

  6. #6
    Join Date
    May 2013
    Location
    australia
    Posts
    2,541


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    i don't see why that will not work , assuming the pic config you have omitted showing is correct

    can you blink a led ?


    this works fine for a 648a , a 628a's rich brother
    Code:
    '****************************************************************'*  Name    : LCD_TEST.BAS                                      *
    '*  Author  : RICHARD                                           *
    '*  Date    : 4/8/2017                                          *
    '*  Version : 1.0                                               *
    '*  Notes   : pic16f648a    ep7                                 *
    '*          :  2016 LCD                                         *
    '****************************************************************
    #CONFIG
      __config  _INTOSC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_OFF & _MCLRE_ON & _BODEN_ON & _LVP_OFF & _DATA_CP_OFF & _CP_OFF
    #ENDCONFIG
        
    DEFINE OSC 4 
    
    
    'LCD defines begin here   
        DEFINE LCD_BITS 4 	'defines the number of data interface lines (4 or 8) 
        DEFINE LCD_DREG PORTB	'defines the port where data lines are connected to
        DEFINE LCD_DBIT 0 	'defines the position of data lines for 4-bit interface (0 or 4)
        DEFINE LCD_RSREG PORTB	'defines the port where RS line is connected to
        DEFINE LCD_RSBIT 4 	'defines the pin where RS line is connected to 
        DEFINE LCD_EREG PORTB 	'defines the port where E line is connected to 
        DEFINE LCD_EBIT 5 	'defines the pin where E line is connected 
        DEFINE LCD_COMMANDUS 1500 	'defines the delay after LCDOUT statement 
        DEFINE LCD_DATAUS 50 		'delay in micro seconds
    'END of LCD DEFINES       
        
        Pause 500       ' LCD initialize time
        lcdout $FE,1 
        LCDOUT $fe,$83,"HELLO"
        LCDOUT $fe,$c8,"World"
        stop
    end
    
    ps  rb4 must be pulled low if using ep7 on board programmer or else pgm load will never verify
    Warning I'm not a teacher

  7. #7
    Join Date
    Oct 2011
    Posts
    54


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    Hi stargazer

    I think you have the defines for the LCD wrong. Have a look at the schematic in the user manual for the LCD. You will see that portb.0 to portb.3 is connected to the HIGH four data bits of the LCD.

    Change
    DEFINE LCD_DBIT 0
    to
    DEFINE LCD_DBIT 4

    Check that the LCD has power (I think you have to set a switch or jumper). Your LCD should burst into life.

    Phil

  8. #8


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    I am delighted to report success! Well, sort of. Richard - you started me thinking about a possible hardware issue so I started snooping around with my meter. On the LCD pins, I was seeing some very strange readings - pins shorted together, etc. I upgraded to an Easypic 7 and used your code, and it works like a charm. Not sure why my easy pic 6 was damaged - I barely used it - been sitting in a drawer. BTW with the easy pic 7 that was a great tip about pulling RB4 low - chip will not program unless it is held low ( not sure why?)

    Thanks so much for taking the time to help me!

  9. #9
    Join Date
    May 2013
    Location
    australia
    Posts
    2,541


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    not quite the solution i expected , still you're up and running
    Warning I'm not a teacher

Similar Threads

  1. Replies: 14
    Last Post: - 21st November 2017, 06:33
  2. Examples for EasyPIC
    By savnik in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 13th July 2013, 15:56
  3. MikroElectrnica EasyPIC v7 USB Driver
    By AndyFreestone in forum USB
    Replies: 2
    Last Post: - 3rd April 2013, 14:12
  4. EasyPic 5 board and MCSP
    By Alexander in forum mel PIC BASIC
    Replies: 7
    Last Post: - 19th March 2011, 15:38
  5. MikroElectronika releases PIC32 compiler beta versions
    By ScaleRobotics in forum Off Topic
    Replies: 0
    Last Post: - 17th February 2011, 17:41

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts