Just received my new PIC-LCD3310


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869

    Default Just received my new PIC-LCD3310

    Ok, hoping for some help here. I just received a PIC-LCD3310 form Sparkfun. Very nice LITTLE unit. Documentation is a little on the short side though. I plugged in the USB, and much to my surprise it does come with a small demo preprogrammed.

    Where to go from here? Does it have a USB bootloader built in? If so, how to gain access? If not does anyone know which one works well with this? It would seem to me this would be the best way to use this. free myself from a programmer.

    Any tips will be gratefully appreciated!! You will receive bounds of good karma from me, which along with $1.50 you can get some coffee
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Just received my new PIC-LCD3310

    Oh Oh, I need some karma for my coffee.

    Here is Microchip's bootloader firmware for Olixex's PIC_LCD3310 board. I think I modified it to work with the joystick button. But it is set to the downward joystick. So to go to USB bootloader, press down direction on the joystick (not button press) while you apply usb power. Then use the attached microchip exe file for bootloader. Of course, you will need a pickit2 programmer, or something, to program it the first time.



    Also included in the hope of more karma is an include file for working with the lcd display. It was made from a bunch of posts in this thread.: http://www.picbasic.co.uk/forum/show...3456#post73456 Without it, the LCD is a (*replace word for really difficult here*) to program.

    But using the include file makes it pretty easy to work with.
    Code:
    @ PrintStr 0,0, "If I write more than one line, it will scroll to the next one, and next."
    PIC_LCD3310.zip
    Last edited by ScaleRobotics; - 7th April 2011 at 01:43.

  3. #3
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Just received my new PIC-LCD3310

    Thanks a million Karma!! I found a little success. I connected the ole pickit2 and first uploaded the demo file. then programed the BL you Walter provided. The PC software said it connected so I tried programming with one of Walters files from the linked thread. I was hoping to have a screen that said something. But I got nothing. So back to the pickit and reprogrammed the demo. Well that worked again, so I must assume The program I tried to run just wasn't going to work. I must admit, I didn't really do much, here is the code as I tried it.
    Code:
    DEFINE OSC 48
    DEFINE BOOTLOADER_USED =1  '{- I added this line
    include "modedefs.bas"
    include "LCD_3310v32.inc"         '{- I modified this for the inc in the zip
    start:
    
    @ PrintStr  0,0, "I love being"
    @ PrintStr  0,1, "able to print "
    @ PrintStr  0,2, "so easily!"
    
    end                                        '{added cuz it seemed right
    Seems like I also tried to use it without the bootloader, of course without the define for it. Still no joy
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  4. #4
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Just received my new PIC-LCD3310

    Ok I can blink the LED's
    Code:
    DEFINE OSC 20               ' this makes the pauses be correct time
    'DEFINE LOADER_USED 1
    include "modedefs.bas"
    include "LCD_3310v32.inc"
    start:
    
    @ PrintStr  0,0, "I love being"
    @ PrintStr  0,1, "able to print "
    @ PrintStr  0,2, "so easily!"
    low porte.2
    pause 1000
    low porte.3
    pause 1000
    high porte.2
    pause 1000
    high porte.3
    pause 1000
    goto start
    end
    but only if I program from MPLAB with no BL. and no LCD message
    Last edited by cncmachineguy; - 7th April 2011 at 04:04. Reason: changed OSC
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  5. #5
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Just received my new PIC-LCD3310

    Sorry, I will have to check into that other file. I need to look at the differences more to see what's going on. But this should get you going (with caps only). Use the attached include.LCD_3310.zip

    Code:
    DEFINE LOADER_USED 1
    DEFINE RESET_ORG 1000h ' For Microchip USB Bootloader
    OSCTUNE.6 = 1     'turn on PLL
    DEFINE OSC 48
    include "modedefs.bas"
    include "LCD_3310.inc"
    
    TRISD = 0
    PORTD.0 = 1   'turn on g sensor
    PORTD.1 = 0   'select scale for g sensor
    PORTD.2 = 0   'select scale for g sensor
    
    
    TRISA = %00000111   'set porta.0, 1, and 2 as inputs
    TRISB = 0
    TRISC = 0
    CM1CON = 7
    CM2CON = 7
    TRISC = 0
    TRISE = 0
    ADCON0 = %00000001    
    ADCON1 = %00000010      
    
    @ PrintStr 0,0, "OK, I LOVE JUST BEING ABLE TO PRINT ON THE LCD SCREEN. BLINKING AN LED IS ALSO NICE."
    END
    Last edited by ScaleRobotics; - 7th April 2011 at 12:12. Reason: forgot to turn on PLL with osctune.6 = 1

  6. #6
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Just received my new PIC-LCD3310

    Walter thank you so much. The BL is working and the printstr is working. As a side not, when it wasn't working, I could just hit the joystick down and it would connect. Now that it works, I DO have to actually unplug the USB and do it as you said too.

    Also it seems to be running at 20 Mhz. my blinks are ~twice as long as they should be with OSC 48. When I change it to OSC 20, the pause commands seem to be 1 sec as expected.

    But again, THANKS a million. I can go to bed now happy knowing this works so far

    EDIT: Maybe nothing is wrong with the include, maybe I just needed to also add
    Code:
    DEFINE RESET_ORG 1000h
    I will try this tomorrow
    Last edited by cncmachineguy; - 7th April 2011 at 05:06. Reason: added EDIT
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  7. #7
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Just received my new PIC-LCD3310

    Quote Originally Posted by cncmachineguy View Post
    Also it seems to be running at 20 Mhz. my blinks are ~twice as long as they should be with OSC 48. When I change it to OSC 20, the pause commands seem to be 1 sec as expected.
    Hey Bert, add this line to the top of your code. It works whether or not you are using the bootloader.
    Code:
    OSCTUNE.6 = 1    'SET PLL TO ON
    EDIT: Maybe nothing is wrong with the include, maybe I just needed to also add
    Code:
    DEFINE RESET_ORG 1000h
    There is an issue with that LCD_3310v32.incfile, just not sure what yet....So for now, just use the LCD_3310.

Members who have read this thread : 0

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

Posting Permissions

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