Sending text to GLCD using BV4511 interface


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Sending text to GLCD using BV4511 interface

    I found a similar sketch to test the i2c bus for an arduino.

    Code:
    / This sketch tests the standard 7-bit addresses
    // Devices with higher bit address might not be seen properly.
    When polled it reported one device found at 0x21

    I have no idea why when I do the same with the PBP code it reports 128 devices found at all the even addresss (0,2,4,6,8,0A,0C etc etc)

  2. #2
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: Sending text to GLCD using BV4511 interface

    In the I2C search portion of the program do you have the ", NoAck" and the NoAck label?

    I2Cread SDA, SCL, ADDR, [Response], NoAck
    Blah
    Blah
    Blah

    NoAck:
    Next ADDR

    The ", NoAck" portion makes the I2Cread command wait for an ACK from the device. If an ACK is NOT received it jumps to the NoAck label where the ADDR variable is incremented. If an ACK IS received then the SlaveCount variable is incremented and the address is output telling you that that address responded.

    Also, do you have the DEFINE I2C_HOLD 1 statement still in there?
    The controller may need this clock stretching support.
    Regards,
    TABSoft

  3. #3
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Sending text to GLCD using BV4511 interface

    Errr... No not used the NoAck

    To be honest given all this hassle and the way the datasheets don't help, I'm going to look for another device. I picked this up from e-bay for £12 (half the price of the current model) so I've not wasted a huge amount of cash.

    I appreciate you help

    Malcolm

  4. #4
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: Sending text to GLCD using BV4511 interface

    Oops.

    Yep, without the NoAck all even numbered addresses will report found because you're not testing for the ACK, which is exactly what it reported finding 128 devices.
    Regards,
    TABSoft

  5. #5
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Sending text to GLCD using BV4511 interface

    Over the past few days I've been in correspondence with Tabsoft trying to resolve this issue. I'm now at a total loss, and I think even Tabsoft is baffled as the issue just doesn't make sense.

    The hardware:
    Easypic5, solderless breadboard, Arduino UNO, DS1307, 24C256 EEPROM, 18F4580, BV4512 board, FTDI USB board.

    Testing:
    Serial port monitor, Hantek 20mhz scope

    Basically running a simple code to scan the I2c buss and if any device is found to display it's address via the serial monitor. When using an identical script on the Arduino all three devices (DS1307, 24C256 and BV 4512 board is detected and their addresses displayed on the serial monitor. Running the equivalent code on the PIC it finds the DS1307 and 24C256 fine, but when the BV board is connected the PBO code detects a poor response on the buss and displays a "fault" message.

    Using the scope the normal 9 pulses can be seen on both Arduino and PIC when just the two devices are running, but when testing with the PIC, both SDA and CLK lines are taken to GND when the BV board is connected.

    Thinking that it may be something to do with the EasyPIC5 board the PIC was programmed and then moved to the breadboard next to the DS1307 and 24C256 chips. The same issue occurred so this eliminated the EasyPic5 board as being the cause. I've tried 10K, 5.6K, 4.7K, and 1K pull-ups on the i2c buss lines, but that makes no difference.

    Anyone have any ideas of further things to try?

    I would like to thank tabsoft for all his help. We've been corresponding via e-mail, often with me doing the practical testing, and reporting back with screen shots etc so we can try and resolve this. The only issue being that due to locations (he's in the US and I'm in the UK) it's often meant that I'm up until 3am most mornings and now I'm walking around like a zombie !!

  6. #6
    Join Date
    Oct 2011
    Posts
    54


    Did you find this post helpful? Yes | No

    Default Re: Sending text to GLCD using BV4511 interface

    Hi Scampy
    You say when testing with PIC, SDA and CLK lines are taken low when BV4611 is connected. According to the data sheet this will cause the BV4611 to start up in SERIAL mode. Have you set the PIC to pull SDA & CLK LOW or are they HIGH untill you connect the BV4611? Do you have the PIC start up with SDA & SCK as inputs untill the BV4611 starts up?
    Surely SDA and SCK should idle HIGH.
    Phil
    By the way I'm in the UK

  7. #7
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Sending text to GLCD using BV4511 interface

    Hi Phil,

    the device I have is the older 4512, which is now obsolete and replaced by the 4611, which I've been told by Jim (the developer) is a "better" device. Tabsoft has managed to get the device responding to a poll from the PIC. It's complicated, but lest just say the Arduino and it's programming language sticks to the true correct protocol of the i2c standard, where as PBP appears to use an abbreviated version which mainstream devices can tolerate, but the BV4511 doesn't.

    I'm also testing the GLCD as I may of damaged it when I connected it to the EasyPic5 board. On the EP5 the CS1 and CS2 are at one end of the header, but on the GLCD pins 15 and 16 are CS pins, so everything is then out by 2.... I need to do some further testing to make sure the GLCD works (going to fly wire to the correct pins one for one when the wires arrive). Once that has been checked and i can confirm it works then the fun begins in trying to get the BV4512 to receive and correctly interpret the PBP instructions to display text correctly....

    If only someone manufactured an 8 x 20 LCD with built in character set based on the standard HD chipset... life would be a lot simpler... but then I guess PBP would only support LCD's up to 4 x 20.

    I'm not going to post up the PBP code as Tabsoft is the main contributor, but I'm sure that once we have resolved this it will be put up for reference should some other poor soul happens to have one of these boards and wants to code in PBP

Similar Threads

  1. Replies: 1
    Last Post: - 4th June 2010, 03:34
  2. How to prepare text (lots of text) for HSEROUT ?
    By Byte_Butcher in forum General
    Replies: 0
    Last Post: - 15th February 2010, 22:31
  3. Glcd
    By buddhafragt in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th August 2009, 18:58
  4. Glcd
    By Sphere in forum General
    Replies: 0
    Last Post: - 26th August 2006, 17:48
  5. Help with sending text file from pic
    By isaac in forum Serial
    Replies: 6
    Last Post: - 15th August 2006, 20:01

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