Show Posts
Pages: 1 ... 40 41 [42] 43 44 ... 96
616  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: June 01, 2013, 12:18:54 am
Multiple Displays: Yes, you can have multiple u8g structs/objects. You can also combine these u8g structs/objects to a larger "virtual" area. See the wiki entry for "virtual screen": http://code.google.com/p/u8glib/wiki/virtualscreen

Oliver
617  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 31, 2013, 02:45:03 pm
Great picture. Thanks!
I have updated the u8glib gallery page.

Some additional work will be required to completly integrate HT1632 support into u8glib...


Oliver
618  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 31, 2013, 12:26:33 pm
Anything is fine, but I think a picture of your current 24x16 will be sufficient.

Thanks a lot.

Oliver
619  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 31, 2013, 07:13:29 am
Great.

I will implement the set contrast feature. Additionally i will also try to make pin handling more flexible.
Would it be possible to make another picture from your device for my gallery page (http://code.google.com/p/u8glib/wiki/gallery)? This would be cool.

Thanks so far.
Oliver
620  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 31, 2013, 12:09:17 am
Quote
The screen is filled from top left downwards. A byte will fill the first 8 pixels from 0,0 to 0,8, the second will fill 0,8 to 0,16! The picture makes it more clear though: http://imgur.com/0UILEN8

Ah, i see the problem. I was assuming, that the first byte goes to 0,0 to 0,8 and the second byte goes to 1,0 to 1,8.
B0 -> B1 -> B2-> ... -> B23
B24 -> B25-> ... -> B47
However, memory structure is like this:
B0 B2 B4 ...
B1 B3 B5 ...

I fixed this in the code and also integrated your other modifications (including the renaming to 24x16) into a new prerelase (attached pre6).
So the question is again: What will you see?

Oliver
621  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 30, 2013, 04:23:09 pm
Could you also post your current "u8g_dev_ht1632.c" file?
I assume that the data write will look similar to this code:
Code:
void ht1632_transfer_data(uint8_t page, uint8_t cnt, uint8_t *data)
{
  uint8_t addr;
  /* send data to the ht1632 */
  digitalWrite(CS_PIN, LOW);
  ht1632_write_data_MSB(3, HT1632_ID_WR, false); // Send "write to display" command
  ht1632_write_data_MSB(7, page*26, false); // Oliver: Not sure if this calculation is correct

  // Operating in progressive addressing mode
  for (addr = 0; addr < cnt; addr++)
  {
    ht1632_write_data(8, data[addr]); 
  } 
  digitalWrite(CS_PIN, HIGH);
}


How will the display change if you modify the code to this (only display the first page of u8glib)?
Code:
void ht1632_transfer_data(uint8_t page, uint8_t cnt, uint8_t *data)
{
  uint8_t addr;

  if ( page != 0 )
   return;
  /* send data to the ht1632 */
  digitalWrite(CS_PIN, LOW);
  ht1632_write_data_MSB(3, HT1632_ID_WR, false); // Send "write to display" command
  ht1632_write_data_MSB(7, page*26, false); // Oliver: Not sure if this calculation is correct

  // Operating in progressive addressing mode
  for (addr = 0; addr < cnt; addr++)
  {
    ht1632_write_data(8, data[addr]); 
  } 
  digitalWrite(CS_PIN, HIGH);
}

One big problem for me is, that i do not understand how the bits are mapped on the screen.
Maybe you could output the following pattern instead of 0xFF:
Code:
// Fill the screen
  // #######################################
  digitalWrite(CS_PIN, LOW);
  ht1632_write_data_MSB(3, HT1632_ID_WR, false); // Send "write to display" command
  ht1632_write_data_MSB(7, 0, false);
  uint8_t i;
  for(i = 0; i<48; ++i)
  {
    ht1632_write_data(8,i);
  }
  digitalWrite(CS_PIN, HIGH);
  // #######################################
Maybe you can make another picture with this pattern, so that we can better understand how the bits are mapped to the screen.

Please excause asking for so many code and pictures, but remote programming sometimes seems to be very complicated...

Oliver

622  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 30, 2013, 03:48:50 pm
Can you post a picture of the "garbage"? Could it be the upper part of "ABC". Maybe mirrored?
Can you also post the current sketch?

Oliver
623  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 30, 2013, 03:00:50 pm
what happens if you uncomment your draw procedure?
You should also move the init procedure into setup():
Code:
u8g_t u8g;
 
void setup(void) {
  u8g_Init(&u8g, &u8g_dev_ht1632_26x16);
}

void loop(void) {
  u8g_FirstPage(&u8g);
  u8g_SetColorIndex(&u8g, 1);
  do  {
    u8g_SetFont(&u8g, u8g_font_7x13);
    u8g_DrawStr(&u8g, 0, 14, "ABCgdef");
  }while( u8g_NextPage(&u8g) )
  delay(1000);
}
624  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 28, 2013, 11:42:53 am
Did you update the Arduino Pin Numbers?
Debuggung: I usually start by expanding the init sequence to output some test pattern.

Oliver
625  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 28, 2013, 10:14:32 am
Quote
Where does ht1632_init gets called? Shouldn't it be inside U8G_DEV_MSG_INIT?
Yes, indeed. It seems that i missed calling tins procedure.

Oliver
626  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 27, 2013, 11:25:20 pm
Quote
EDIT: One last thing! u8g_dev_ht1632_26x16.c should be u8g_dev_ht1632_24x16.c! The panel is 24x16!

Oh, ok, I have renamed the device. For testing you also should restrict the WIDTH to 24.

Oliver
627  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 27, 2013, 05:34:33 pm
I have integrated your code:
Code:
http://code.google.com/p/u8glib/source/browse/csrc/u8g_dev_ht1632_26x16.c
Maybe you can do a code review.
Pin numbers are hard coded at the moment.

I have also attached a new u8glib release, including the updated code. However in the past attachments to the forum seem to be  currupted.

Example .ino is:
Code:

#include "U8glib.h"

void setup(void)
{
}

void loop(void)
{
  u8g_t u8g;
 
  u8g_Init(&u8g, &u8g_dev_ht1632_26x16);
  u8g_FirstPage(&u8g);
  u8g_SetColorIndex(&u8g, 1);
  do  {
    u8g_SetFont(&u8g, u8g_font_7x13);
    u8g_DrawStr(&u8g, 0, 14, "ABCgdef");
  }while( u8g_NextPage(&u8g) );
  delay(1000);
}
Can you test the new code?

Oliver
628  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 27, 2013, 05:14:09 pm
I have some other issues with the code.
ID values are missing. I assume
Code:
#define HT1632_ID_CMD 0x04
#define HT1632_ID_WR 0x05

Then: You used
Code:
writeDataMSB(3, HT1632_ID_WR); // Send "write to display" command
writeDataMSB(7, 0); // Send initial address
but writeDataMSB() requires three arguments. What will be the third argument?

Oliver
629  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 27, 2013, 04:01:00 pm
Code:
writeDataLSB(8, value); 
Is this the write_data() procedure?

Oliver
630  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: May 27, 2013, 01:15:10 pm
Well, the following two procedures need to be filled with some suitable code. For sure this will require some low level transfer functions also. I do not now if there is some need to send an init sequence. If not, then ht1632_init might be empty. The procedure ht1632_transfer_data receives data from u8glib and shoud transfer this data to the display. Are you able to provide such code? What additional information do you need?

Code:
void ht1632_init(void)
{
  /* init display once after startup */
}

/*
  page: 0=data contain lines 0..7, 1=data contain lines 8..16
  cnt: number of bytes in the buffer
  data: pointer to a buffer with "cnt" bytes.
*/
void ht1632_transfer_data(uint8_t page, uint8_t cnt, uint8_t *data)
{
  /* send data to the ht1632 */
}


Oliver
Pages: 1 ... 40 41 [42] 43 44 ... 96