EasyPic 6 Mikroelectronika


Closed Thread
Results 1 to 23 of 23
  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,488


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


    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


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    Yes I can flash an LED - no issues with programming or compiling this code - just does not work for me.

  8. #8
    Join Date
    May 2013
    Location
    australia
    Posts
    2,488


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    Yes I can flash an LED - no issues with programming or compiling this code - just does not work for me.

    starting a new tread with the same problem , not even with any extra info probably will get you no further.
    yes pbp defaults to porta for lcd thats why the defines are used , the defines overwrite the defaults

    what are your config fuse settings ?
    what version of pbp are you using ?
    did you try my code ?
    Warning I'm not a teacher

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


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    i assume you ep6 is connected like this

    Name:  lcd.jpg
Views: 1448
Size:  81.0 KB
    Warning I'm not a teacher

  10. #10


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    Sorry abt the second thread - just getting frustrated!
    I did try your code but did not work - I know your code must be solid so maybe it is a fuse setting or a hardware issue?
    I am using PBP 3.0.8.0 compiler with the mikroProg suite as my software. It lets you set the config bits when you load the hex file. My config bits set the oscillator as internal, watchdog timer enabled, power up disabled, master clear enabled, brown out detect enabled, low voltage program disabled, Data EE disabled. I can flash an LED so I know the PIC is good and everything is working on that end.
    Thanks so much for taking the time and energy to help - I will try again tomorrow.

  11. #11


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    My connections are just like you printed

  12. #12


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    Could the fuse settings be an issue? What software do you use to program your Easypic7? I could not get microcode studio to work with it - it does not seem to be able to find the board.

  13. #13
    Join Date
    May 2013
    Location
    australia
    Posts
    2,488


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    Could the fuse settings be an issue?
    it often is that or failure to set pins to digital, its not the code thats a problem. i assume the contrast is not an issue and that the lcd works and the ep6 board is undamaged and has no conflicting jumper/switch settings


    What software do you use to program your Easypic7?
    I could not get microcode studio to work with it - it does not seem to be able to find the board.
    Name:  mps.jpg
Views: 1441
Size:  174.4 KB

    command line use for the mikro onboard icd doesn't seem to be a possibility, its not going to run from the msc button.
    i just load the hex file manually , if you compile my code the config fuse settings are embedded in the hex file
    there is no need to set them

    you could upgrade to 3.0.10 for free
    Warning I'm not a teacher

  14. #14
    Join Date
    May 2013
    Location
    australia
    Posts
    2,488


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    you realise there are two 18pin skts on the board for different chip pinouts, you need to use the proper one
    Warning I'm not a teacher

  15. #15


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    i set my pins to digital using cmcon=7 , but I think that only sets Port A to digital. By default, is port B digital? Do I need a command to do that?
    I will try your code again tonight - thank you so much for your help!

  16. #16


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    I do realize there are two sockets - i am using socket B, and I can flash an LED so I think it is set up correctly

  17. #17
    Join Date
    May 2013
    Location
    australia
    Posts
    2,488


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    i set my pins to digital using cmcon=7 , but I think that only sets Port A to digital. By default, is port B digital? Do I need a command to do that?
    the code I posted sets up everything necessary to use the lcd. only porta has analogue attributes and plays no part in this exercise
    cmcon=7 will disable the comparator module and set porta pins to digital mode on that chip

    I do realise there are two sockets - i am using socket B, and I can flash an LED so I think it is set up correctly
    but can you set each and every portb pin needed for lcd to flash a led and do they flash at the set rate,

    the problem is not the lcd code
    Warning I'm not a teacher

  18. #18
    Join Date
    May 2013
    Location
    australia
    Posts
    2,488


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    just a thought , you're not trying to use the built in cog serial lcd are you ?

    Name:  lcd.jpg
Views: 1510
Size:  58.1 KB
    Warning I'm not a teacher

  19. #19


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    Not using the serial LCD

  20. #20
    Join Date
    May 2013
    Location
    australia
    Posts
    2,488


    Did you find this post helpful? Yes | No

    Default Re: EasyPic 6 Mikroelectronika

    ok then its back to simple fault finding

    1. can you verify portb pins 0 to 5 actually work
    2. do pins b0 to b5 get to the lcd socket
    3. are pins b0 to b5 shorted to something not intended
    4. does the lcd have power,gnd and contrast connections that work
    5. does the lcd even work
    Warning I'm not a teacher

  21. #21
    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

  22. #22


    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!

  23. #23
    Join Date
    May 2013
    Location
    australia
    Posts
    2,488


    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, 05:33
  2. Examples for EasyPIC
    By savnik in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 13th July 2013, 14:56
  3. MikroElectrnica EasyPIC v7 USB Driver
    By AndyFreestone in forum USB
    Replies: 2
    Last Post: - 3rd April 2013, 13:12
  4. EasyPic 5 board and MCSP
    By Alexander in forum mel PIC BASIC
    Replies: 7
    Last Post: - 19th March 2011, 14:38
  5. MikroElectronika releases PIC32 compiler beta versions
    By ScaleRobotics in forum Off Topic
    Replies: 0
    Last Post: - 17th February 2011, 16: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