Strange problem in ks0108 based 128x64 display at Digital preamp+power amp circuit

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear freaks

 

i'm building a TDA7439 based digital preamp+LM3886 based power amp controlled by ATMEGA32.The LM3886 power amp building is complete.For the preamp purpose,i've chosen a TDA7439 preamp chip and JHD12864 display & ATMEGA32 & a rotary encoder.The main purpose of the display is to show different datas like Bass,Treble etc in the display and their values.There will be a rotary encoder by pressing which i will switch between different parameters and increase/decrease the values by turning it right/left.Parallely their updated values will be displayed.

I'm trying a test update program in which all the values will be showing "00" at startup and after that volume,bass,treble,middle,balance will be updated to certain values after 1 sec interval.

My problem is that Volume,Mid and treble values are getting successfully updated but the Bass & Balance values are getting overlapped with the previous "00".I'm using 5x7 font.The main library is the popular Fabian's library for ks0108 and the font is arduino library 5x7 font.I'm attaching all the files and the screenshots of proteus(PLEASE ZOOM THEM TO SEE) of startup(with all pameter values-"00") and after one test update (with random values of the parameters like volume-51,bass-20(overlapping with previous 00),treble-20 etc etc).Also i noticed that the Y axis value of the Bass value/text and Balance value/text is the same.I also tried to update the whole line with different character/string.But that also failed.The problem is in that particular line.The same thing is happening in real time testing with atmega32 and 128x64 lcd..Please suggest me what to do

 

Attachment(s): 

Last Edited: Mon. Dec 7, 2015 - 10:38 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Make sure you always write the same amount of characters and/or erase the previous data.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:

Make sure you always write the same amount of characters and/or erase the previous data.

 

Did you notice that all the values consist of 2 characters(same amount of data) and also every other values like Volume/Mid/Treble is being updated successfully except only the Bass & Balance?How is that possible??

 

If i've to erase the data,then from the 5x7 font header file,i saw that if i send 2 "spaces"(as it will write all 0's to ks0108),then the area must be cleared.I tried that also and it is clearing the data area for the same Volume/Mid/Treble but not for Bass & Balancesad.Please take a look in the attachment.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hellow,

 

Sorry I'm not very fluent in english..but i used 128 x 128 LCD with 4 Ks 108 and draw text ; graphic or Icons on the screen (For example see attached file) 

 

The KS 108 have not a real graphic mode (see the data sheet)....

 

For the initialization the code run this line to print the bass value:

 

ks0108_gotoxy(2,36);

ks0108_puts("Bass - 00");

 

Your code is correct and print 8 chars  "Bass - 00" at the line 2 and the pixel 36:  All the line and char are correctly draw on the screen.

 

After take the BASS for example:

 

 Your code (print_param_val(BASS,20)) call the line  (case BASS: ks0108_gotoxy(44,36); print_val(val1); break;

 

The KS 108 nead to have a line from 0 to 7 and a pixel from 0 to 128 to draw data the function  (goto_xy (44, 36))  put the cursor at the  line  44/8 (The line 6!) and 36 is the pixel for the B of BASS!. The data cannot appears after BASS on the line 2..

 

To print a char you must used a line from 0 to 7 (The Vertical location on the screen, and a pixel from 0 to 128 for horizontal lacation)

 

The goto xy function must be used to draw graphic lines,  the driver compute a line (X value /8) to put the cursor on a line (0 to 7) and then perfrom some computation to light or unlight pixels in the 8 x 8 bloc of the selected line (+ or -)

 

 

 

 

 

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A new page!

Attachment(s):