Thanks for publishing the code.by jimeer - Serial & I2C Devices
The BV4611 has 2 modes of operation, Serial and I2C. When "Waiting for CR" is shown it is in serial mode. To start the controller in I2C mode there must be pull up resistors on the SCL and SDA lines, that is what is missing. I2C will not work without pull up resistors, it is a requirement of the bus specification. More information can be found at www.doc.byvac.comby jimeer - Serial & I2C Devices
The BV4619 will still send out more than one byte for the scan code. At some point in time you are going to have to deal with receiving more than one key and an interrupt is the best way to go. It can still be done without though. The following technique can be used. I will use sudo code as I am not familiar with the CCS compiler: You will need to wait until a byte has been put in the UARTby jimeer - Serial & I2C Devices
Unfortunately I am not familiar with that compiler and how it handles serial communication. The BV4618 is a very straight forward serial device and so you would get a far better answer to your question in the forum for the CCS compiler, unless there is somebody else with the same compiler in this forum?. I had a quick look and there are lots of posts about serial communication, so it looks like iby jimeer - Serial & I2C Devices
What compiler are you using?by jimeer - Serial & I2C Devices
hello, The BV4618 will send "text" as a reply to the esc; while(c != 42) { // key() should wait until a key is available and then return it c = key(); if(c !=42) // don't want 42 to be part of input buf=c; } You may want to look at buffered serial examples using interrupts as that will give you much more flexibility. This is really a PIC quby jimeer - Serial & I2C Devices
Thanks for posting the solution, it will help others with Picaxeby jimeer - Serial & I2C Devices
Hello, the minimum step rate is 70 and that is what is causing the error, this is explained in the datasheet in section 13.3, at the end of the document. It was updated in December so your browser may be caching a previous version. To add to the confusion the table itself stated 0 - 65000 so that has now been updated. 70 is very slow when microstepping (45 seconds for 1 revolution), but the cby jimeer - Serial & I2C Devices
I cant help you with the picaxe code but the display in serial mode needs a single byte 13 (0x0d) to establish the Baud rate, when it receives this another message will appear. Some common issues: 1) TX and RX on the wrong pins, TX should go to RX and RX to TX 2) Baud rate should be selected from a list in the data sheet, if in doubt use 9600 3) The controller is sending LF before CR Wouby jimeer - Serial & I2C Devices
1) The BV4619 directly controls the HD44780 or equivalent on the display and that gives a clue as to where to look for the answers. To move the cursor around the display a command is sent. Not all displays are the same but for the majority of 20x4 displays will respond to the following: start of line1 = 128 start of line2 = 192 start of iine3 = 148 start of line4 = 212 As an example iby jimeer - Serial & I2C Devices
You are working on the assumption that the power supply is providing 5V at 2A. The fact that is gives 6V under no load should ring alarm bells. For supplying this type of equipment you need a DC regulated power supply. The one you have is either faulty or not suitable. Supplying any equipment rated at 5V could lead to damage if supplied with a higher voltage although it is quite likely that 6Vby jimeer - ByPic
The question I keep getting asked is that the display does not display any characters but the communication is working because the back light or some other function can be changed. This is nearly always down to the supply voltage that must be greater then 4.8 Volts. see This post for more details.by jimeer - ByPic
Happy to help, I have had this before so it may be a common problem for the Arduino although the UNO I have here supplies 5V okay. Jimby jimeer - Serial & I2C Devices
There are 3 LCD controllers intended for character type displays (16x2 etc..) that all have differing features to suit differing kinds of project, here is a summary: P017 - This is supplied as an IC for building into other projects it also can be supplied with a PCB making a very low cost option. It does require some building as it is supplied as a kit. BV4619 - This is very similar to the P0by jimeer - Announcements
Thanks for the detailed explanation. A couple of things spring to mind: 1) We can safely say that the I2C communication is okay otherwise the BL would not change like it does so we need to concentrate on the LCD itself. 2) It looks a bit dim but could be just the video, however check the voltage on pins 1 and 2, it must be at least 4.8V otherwise the LCD will not work 3) Now check the voltaby jimeer - Serial & I2C Devices
Well I was hoping that somebody would write some Adruino libraries for this device, however nothing so far so I have done it. There are two libraries: P017 - for the serial controller P017 - for the I2c controller Both can be found In the documentation. This is an example from the P018 sketch: // Example of how to use the LCD library with the P018. // P017 - serial LCD controllerby jimeer - Serial & I2C Devices
Richard, I am not sure what you are talking about with esc[k? No esc commands are needed. To read the device you simple read 2 bytes and that will give you a status and a key byte. e.g status = i2c_readbyte() data = i2c_readbyte() As you say this device considerably frees up any resources required to monitor, decode and present the IR signal, at least one interrupt and timer would beby jimeer - Serial & I2C Devices
Richard, The data sheet is very poor in its explanation of the way read is used for I2C the implication being that a command should precede it but this is not the case. The way to read this device on I2C is exactly as follows: send start condition send 0x25 // read address read 2 bytes send stop condition Of course some systems may wrap this up into two or even a single command. The firstby jimeer - Serial & I2C Devices
Thanks for the post. One of the reasons I don't use assembler any more but the main one is going back to the code after a few months, i.e maintenance. Jimby jimeer - Serial & I2C Devices
Geoff, you may have abbreviated the question so I will spell it out in case something is missed. Using I2C, you need to send a command and then read back the information sent by the BV4618, so to get the key scan code of the key pressed would be: * send start condition * send address 0x62 * send 0x1b * send 0x11 * send stop condition * send start with address 0x63 << read addressby jimeer - Serial & I2C Devices
The following code should do it: // ***************************************************************************** // sends a string to the LCD // ***************************************************************************** function lcd_text(s$[30]) dim j i2c_start(I2CADR) i2c_putc(3) // data command for j = 0 to strlen(s$)-1 i2c_putc(asc(s$,j)) next i2c_by jimeer - ByPic
Hello, I can help, there is a problem when using more then one BV4614 with firmware version 1.2, which is probably what you have. It needs updating which I can do. Can you contact me: jim at byvac.com to make the arrangements. *** This applies only to devices with 1.2 or earlier firmware, there is a workround and that is to connect the reset pin (4) on the serial connector to ground. This wilby jimeer - Serial & I2C Devices
hello, if you want a reply to your posts then you need to be more specific. The question you have posed above does not make any sense to me, I cannot tell what problem you are having other than something to do with fonts. I have no idea why you are using fload, it is nothing to do with fonts and is not in the getting started guide. I suggest that you simplify the problem to a specific item aby jimeer - BV523
Sorry, I can't help with this one perhaps somebody else can.by jimeer - BV523
you will find the information you are looking for here: www.bypic.byvac.com - getting startedby jimeer - BV523
hello, the code document page for the BV4618 is here. There was also a bit bang I2C interface (zip file here) I have written an interface that can be compiled as follows: gcc –o i2cbb bcm2835_i2cbb.c bcm2835.c and can be run: sudo ./i2cbb This is an alternative I2C written for user space but it does go at 100kHz and can be used on any pin. I don't think I have any more bits of code.by jimeer - Serial & I2C Devices
To set up the BV4221 for use in an automated system: P0 - sets promt off D - set to decimal (optional) F - fix write settings to EEPROM so that this is now default B115200 - fixed baud rate to 115200 at start up I have some Python code that does this to emulate smbus on windows - still work inprogress but here it is:by jimeer - Serial & I2C Devices
P is the prompt command P1 or P0 it is in the data sheet on page 10. The only time that it 'should' lock up is when the slave holds the clock low or there is some other device holding either the clock or data low but disconnecting the slave should resume normal service. There are a few commands that could stop the device from responding as normal such as changing the line end character, swby jimeer - Serial & I2C Devices
The BV4221_V2 has a buffer limit 70 and so it is likely that it has wrapped round when sending more bytes than it is capable of receiving. It is not really possible to write to flash from the user interface so it is probable that the settings have been altered to suppress the prompt, try P1 This device can be upgraded via the USB so if all else fails the firmware can be reloaded via the buby jimeer - Serial & I2C Devices
Bruce, as long as the set up is run before the function. The fault is not with the function RT() as this code works perfectly well when saved to flash, I have just tried it: function RT() dim a,b //local values b = 0 //set b = 0 print "1 " // ** for testing ** for a = 1 to 500 print "2 " // ** for testing ** b = b + adc_get(2) // getby jimeer - ByPic