Show Posts
Pages: 1 ... 46 47 [48] 49 50 ... 102
706  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: June 01, 2013, 10:07:34 am
Great, I will close this issue for now. Let me know if you find some additional issues.

Oliver
707  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: June 01, 2013, 06:46:55 am
Hi

The HT1632 has now been integrated into U8glib. I have added the new constructor to HelloWorld and GraphicsTest examples (other examples will be updated for the final v1.13 release)

Code:
U8GLIB_HT1632_24X16 u8g(3, 2, 4); // WR = 3, DATA = 2, CS = 4

You should be able to change the Arduino pin numbers to whatever is required.
I have attached a prerelease with the new constructor call. Please let me know if this constructor call works correctly.
The virtual screen feature  (combination of four screens to one huge screen) should also be possible now.

Thanks, Oliver

708  Using Arduino / Programming Questions / Re: Arduino Mega 2560 + Graphic LCD + GPS Shield + DS1307 RTC on: June 01, 2013, 06:22:00 am
Regarding U8glib: You must enclose the draw commands into the "picture loop".
See here: http://code.google.com/p/u8glib/wiki/thelloworld

Example:
Code:
  // picture loop
  u8g.firstPage(); 
  do {
    //Print a message to the LCD.
    u8g.setFont(u8g_font_unifont);
    u8g.drawStr( 0, 22, "Hello!");
    u8g.setFont(u8g_font_unifont);
    u8g.drawStr( 0, 33, "coordinate GPS");
     ...
  } while( u8g.nextPage() );

You can also use the "print()" command to draw strings on the GLCD.

Oliver

Oliver
709  Using Arduino / Installation & Troubleshooting / Re: help me to display hmc 6532 on ST7920 :( on: June 01, 2013, 06:14:25 am
Hi

Can you display something on your Display? Are the examples from the U8glib working?

U8glib supports the print() procedure, so everting what can be printed with Serial.print() can be used 1:1 with U8glib.

Oliver
710  Using Arduino / Displays / Re: Help add support for HT1632 in u8glib on: June 01, 2013, 05:24:39 am
Hi

I am working on this.
The device has already been updated:
http://code.google.com/p/u8glib/source/browse/csrc/u8g_dev_ht1632.c

Oliver
711  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
712  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
713  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
714  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
715  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
716  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

717  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
718  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);
}
719  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
720  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
Pages: 1 ... 46 47 [48] 49 50 ... 102