Yet another Volume controlers and source selections

Thanks FarmTech
I was hoping do see the modified .bas file but this is OK.
Going to give up for now, can get the programer (USBASP) to connect to the atmega.
Tried Ponyprog, avrstudio, winavr, extreme burner and a free version from bascom avr and nothing.
Going to look for a serial programer.

Ric

I was hoping do see the modified .bas file but this is OK.
its in the ZIP

what USBASP programmer did you get link

I used mine USBASP and it was OK
I used Bascom & khazama both works
Mine have 2 jumpers 1 for programmer update and other to select 5V or 3.3V
did you install libusb driver ?? see http://www.fischl.de/usbasp/
 
Last edited:
I was hoping do see the modified .bas file but this is OK.
its in the ZIP

what USBASP programmer did you get link

I used mine USBASP and it was OK
I used Bascom & khazama both works
Mine have 2 jumpers 1 for programmer update and other to select 5V or 3.3V
did you install libusb driver ?? see fischl.de - USBasp - USB programmer for Atmel AVR controllers

The .bas file in the .zip is the original one all the line for the PGA2310 are still there (or I'm missing something)
My USBASP is the black one, I know that there is at least 1 jumper for the 5V/3.3V selection but not sure about the second one.
About the software I'm starting to think that the problem is my laptop ( Vaio VGN-NR71B with Win 7 )
What is doing my head in is that I programed hundreds of avrs before (8515, atmega128...) and 32bits processors (Jtag) for digital set top boxes and never had so much trouble.
Going to try in another computer ( going to put one together) with win98 and XP and try again this week

Ric
 
Last edited:
The .bas file in the .zip is the original one all the line for the 2311 are still there (or I'm missing something)
ric

Yes the code you don't need have color GREEN that REM code not in use
but here is a clean up bas
you still just write a color of you'r USBASP
to see what version yo have I do need the link to the USBASP you got

there are some of them that use reg as USB HID not USBASP so you need other program for this models
on ebay its the one with cover in many colors
5-17.jpg

software AVR_fighter
or serach for progisp that works ok
or check out uwezi blog about how to make it a "real" USBASP
 

Attachments

  • RS232_clean_up.zip
    11.3 KB · Views: 90
Last edited:
Hi Junie,

There is no default.
Once you have started to edit and you have saved, to get to default you need to edit back.
To edit and change menu´s you need to setup a remote first. Than use the chan+/- to change characters and vol+/- to move to next character. Add one more dummy character and press, on the remote, mute to validate and power to save new menu name.

To edit CD and change to SOURCE you need to press Input push button till Edit Input Text, than rotate encoder.
CD will appear.
From this point on use remote to edit.
Add one more character at the end of SOURCE.
EX: SOURCEA
Press Mute to validate
Press power to save.
That´s all.

Please also have a read on this documentation (page 3):
https://docs.google.com/viewer?url=...2r_volume-controller_config.pdf&embedded=true


Also please note that there are two open collector transistors Q8 and Q9.
Q9 can be used to command a external relay for power on/off and Q8 have a delay for powering a tube plate relay, in case you use VC for a tube equipment.

Regards,
Tibi
 
Last edited by a moderator:
To edit CD and change to SOURCE you need to press Input push button till Edit Input Text, than rotate encoder.
CD will appear.
From this point on use remote to edit.
Add one more character at the end of SOURCE.
EX: SOURCEA
Press Mute to validate
Press power to save.
That´s all.
Hi Tibi ,

you can make it show "Space" and not A if you make a change in Sub Edit_input_txt:

Case Mut_a :

here you have .
Code:
             Lcd X                                     'show the new text for input
                  [B]My_chr = 65[/B]
                  X_chr = 1
                  My_string = ""
                  Locate 2 , X_chr
                  Lcd Chr(my_chr)
                  Shiftcursor Left

change My_chr = 65 to My_chr = 32

only diffrent is you have to scrool past 0-9 before you have letters :)
but it dont show the extra A when saving

But , you can edit in Case Shift_l : & Case Shift_r : to jump to letters order Letters, numbers

try this for Case Shift_l :
Code:
   Case Shift_l : Incr My_chr
              If My_chr = 33 Then My_chr = 65               'from space to A
              If My_chr > 90 Then My_chr = 48               'from Z to 0
              If My_chr = 58 Then My_chr = 32               'from 9 to  space
if that will make it more easy for user

now it go space to A-Z then 0-9 and back to space
well just a Idea ...
 
Last edited:

Attachments

  • Quasar.jpg
    Quasar.jpg
    35.6 KB · Views: 866
  • 2013-05-31-019.jpg
    2013-05-31-019.jpg
    19.7 KB · Views: 870
Last edited by a moderator:
Thanks FarmTech !

Mute was added in main menu due a custom version made for a client.
Normally this should be available only from remote, but ... I'm not decided to keep or remove him.

Thanks for observation.

Regards,
Tibi

MUTE is located 1 place wrong in menu
it was located 1 place wrong on LCD :)
it jump 1 place right on lcd , when it exit (menu) to main and show mute

if i did not explain it right :)
 
Hello,

I have made big digits for a 4-line (4x40) character display, Newhaven NHD-0440WH-ATFH-JT or NHD-0440AZ-FL-YBW. I used the following code. I did not include the variable definitions but it is fairly obvious what they would be. It reqiures the xmega library that I have posted at MCS Electronics a few times. This code was posted in the public domain, so I gave credit to the original author. I also fixed a few bugs as well. It is the basics of the alarm clock function for my radio/media player. I use push button encoders for the UI. At night when in alarm set mode, I use big digits to display the current time. As you can see I use the Pca8565 as a RTC. It works great. Keeps time for days on a small super cap.
Enjoy and hope you can make use of it.
Rick Savas
'------------------------------Configure Port E---------------------------------
'Porte_dir = &B1011_1011 'If DIRn is written to one, pin is configured as an output pin.
'---------------------------------LCD Setup-------------------------------------
'use lcd4e2-xmega-vport0.lib and define port E as vport 0
Config Vport0 = E 'Real Port Direction
Ddre = &B1111_1111
Vport0_dir = &B1111_1111 'Virtual Port 0 = OUTPUT
Config Lcd = 40 * 2 'Config Lcd = 40 * 2(update 2.0.7.3 :Both are valid, but the * will become invalid in the future.
Dim ___lcde As Byte 'use for two Enable module type,0 = Top 2 rows, 1 = Bottom 2 rows
Initlcd 'same as asm "Rcall _init_lcd"
Waitms 100
___lcde = 0 'select the upper 2 line controller 'clear the LCD display
Cursor Off Noblink 'hide cursor
Cls
'reference p431 of Intro Into Practical Electronics Microcontrollers And Software Design, B. Collis 'select top controller
Deflcdchar 1 , 32 , 32 , 32 , 1 , 3 , 7 , 15 , 31 'these characters are used to build the bigdigits for alarm function
Deflcdchar 4 , 31 , 15 , 7 , 3 , 1 , 32 , 32 , 32
Deflcdchar 2 , 32 , 32 , 32 , 31 , 31 , 31 , 31 , 31
Deflcdchar 3 , 32 , 32 , 32 , 16 , 24 , 28 , 30 , 31
Deflcdchar 5 , 1 , 3 , 7 , 15 , 31 , 32 , 32 , 32
Deflcdchar 6 , 31 , 31 , 31 , 31 , 31 , 32 , 32 , 32
Deflcdchar 7 , 1 , 3 , 7 , 15 , 31 , 31 , 31 , 31
Deflcdchar 0 , 31 , 30 , 28 , 24 , 16 , 32 , 32 , 32
___lcde = 1 'select the upper 2 line controller 'clear the LCD display
Cursor Off Noblink 'hide cursor
Cls
Deflcdchar 1 , 32 , 32 , 32 , 1 , 3 , 7 , 15 , 31 'these characters are used to build the bigdigits
Deflcdchar 4 , 31 , 15 , 7 , 3 , 1 , 32 , 32 , 32
Deflcdchar 2 , 32 , 32 , 32 , 31 , 31 , 31 , 31 , 31
Deflcdchar 3 , 32 , 32 , 32 , 16 , 24 , 28 , 30 , 31
Deflcdchar 5 , 1 , 3 , 7 , 15 , 31 , 32 , 32 , 32
Deflcdchar 6 , 31 , 31 , 31 , 31 , 31 , 32 , 32 , 32
Deflcdchar 7 , 1 , 3 , 7 , 15 , 31 , 31 , 31 , 31
Deflcdchar 0 , 31 , 30 , 28 , 24 , 16 , 32 , 32 , 32

'I_bigdigit = 0 'Debug,write big digits across display
'For Digitpos = 1 To 40 Step 4
'Show_bigdigit
'Incr I_bigdigit
'Waitms 100
'Next
'Wait 1
___lcde = 0
Locate 1 , 1
' 0123456789012345678901234567890123456789
'Lcd "****************************************" 'display this at the top line
Lcd "***DSP-Radio-Media Player FW v1.0.0.1***" 'startup banner
Locate 2 , 1
' 0123456789012345678901234567890123456789
'Lcd "****************************************" 'display this at the top line
' Lcd "Encoder/switch/led,RTC,USB UART Testing "
___lcde = 1 'select the lower 2 line controller
Locate 1 , 1
' 0123456789012345678901234567890123456789
Lcd "****************************************"
Locate 2 , 1
' 0123456789012345678901234567890123456789
Lcd "****************************************"
'
'these characters are used to build the bigdigits
'Deflcdchar 1 , 32 , 32 , 32 , 1 , 3 , 7 , 15 , 31
'Deflcdchar 4 , 31 , 15 , 7 , 3 , 1 , 32 , 32 , 32
'Deflcdchar 2 , 32 , 32 , 32 , 31 , 31 , 31 , 31 , 31
'Deflcdchar 3 , 32 , 32 , 32 , 16 , 24 , 28 , 30 , 31
'Deflcdchar 5 , 1 , 3 , 7 , 15 , 31 , 32 , 32 , 32
'Deflcdchar 6 , 31 , 31 , 31 , 31 , 31 , 32 , 32 , 32
'Deflcdchar 7 , 1 , 3 , 7 , 15 , 31 , 31 , 31 , 31
'Deflcdchar 0 , 31 , 30 , 28 , 24 , 16 , 32 , 32 , 32

'Test_bigdigit:
' Digitpos = 1
' For I_bigdigit = 0 To 9
' Gosub Show_bigdigit
' Waitms 100
' Next
' Wait 1
' Gosub Show_bigtime
' Wait 1
'Return

Show_bigtime:
'Call Pca8565_gettime()
Pca8565_minute_temp = Makedec(pca8565_minute)
Pca8565_hour_temp = Makedec(pca8565_hour)
'Pca8565_second_temp = Pca8565_second
___lcde = 0 : Locate 1 , 1
'Cls
'Lcd "1234567890123456789012345678901234567890"
Lcd " "
Locate 2 , 1
Lcd " "
___lcde = 1
Locate 1 , 1
Lcd " "
Locate 2 , 1
Lcd " "
If Pca8565_hour_temp > 12 Then Pca8565_hour_temp = Pca8565_hour_temp - 12
If Pca8565_hour_temp = 0 Then Pca8565_hour_temp = 12 'find the digit in the tens of hours position
I_bigdigit = Pca8565_hour_temp / 10 'e.g. 19/10 = 1 (byte arithmentic!!)
Digitpos = 1
If I_bigdigit > 0 Then
Show_bigdigit
Else
Disp_blank
End If
I_bigdigit = Pca8565_hour_temp Mod 10 'e,g. 19mod10 = 9 (finds remainder)
Digitpos = 5
Gosub Show_bigdigit
___lcde = 0
Locate 2 , 9
Lcd Chr(6)
___lcde = 1
Locate 1 , 9 'Locate 3 , 9
Lcd Chr(2) 'find the digit in the tens of minutes position
I_bigdigit = Pca8565_minute_temp / 10 'e.g. 21/10 = 2 (byte arithmentic!!)
Digitpos = 11
Gosub Show_bigdigit 'find the digit in the units of minutes position
I_bigdigit = Pca8565_minute_temp Mod 10 'e.g 21mod10 = 1 (finds remainder)
Digitpos = 15
Gosub Show_bigdigit 'display the seconds in the bottom corner of the display
'Locate 2 , 19 'Locate 4 , 19
Digitpos = 19
If Am_pm = 0 Then
I_bigdigit = 11
Else
I_bigdigit = 12
End If
Gosub Show_bigdigit
'If Pca8565_second_temp < 10 Then Lcd "0"
'Lcd Pca8565_second_temp
Return

Show_bigdigit:
Select Case I_bigdigit
Case 0 : Disp0
Case 1 : Disp1
Case 2 : Disp2
Case 3 : Disp3
Case 4 : Disp4
Case 5 : Disp5
Case 6 : Disp6
Case 7 : Disp7
Case 8 : Disp8
Case 9 : Disp9
Case 10 : Disp_dot
Case 11 : Disp_a
Case 12 : Disp_p
Case 12 : Disp_m
End Select
Return

Disp0:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd Chr(1)
Lcd Chr(2)
Lcd Chr(3)
Locate 2 , Digitpos 'line 2
Lcd Chr(255)
Lcd " "
Lcd Chr(255)
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd Chr(255)
Lcd " "
Lcd Chr(255)
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd Chr(4) 'line 4
Lcd Chr(6)
Lcd Chr(0)
Return

Disp1:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd " "
Lcd Chr(1)
Lcd " "
Locate 2 , Digitpos 'line 2
Lcd Chr(5)
Lcd Chr(255)
Lcd " "
___lcde = 1
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd " " 'line 3
Lcd Chr(255)
Lcd " "
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd Chr(6) 'line 4
Lcd Chr(6)
Lcd Chr(6)
Return

Disp2:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd Chr(1)
Lcd Chr(2)
Lcd Chr(3)
Locate 2 , Digitpos 'line 2
Lcd Chr(6)
Lcd " "
Lcd Chr(255)
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd Chr(7)
Lcd Chr(6)
Lcd Chr(0)
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd Chr(6) 'line 4
Lcd Chr(6)
Lcd Chr(6)
Return

Disp3:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd Chr(1)
Lcd Chr(2)
Lcd Chr(3)
Locate 2 , Digitpos 'line 2
Lcd " "
Lcd Chr(2)
Lcd Chr(255)
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd " "
Lcd " "
Lcd Chr(255)
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd Chr(4) 'line 4
Lcd Chr(6)
Lcd Chr(0)
Return

Disp4:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd Chr(2)
Lcd " "
Lcd " "
Locate 2 , Digitpos 'Line 2
Lcd Chr(255)
Lcd " "
Lcd Chr(255)
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd Chr(255)
Lcd Chr(255)
Lcd Chr(255)
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd " "
Lcd " " 'line 4
Lcd Chr(6)
Return

Disp5:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd Chr(2)
Lcd Chr(2)
Lcd Chr(2)
Locate 2 , Digitpos 'line 2
Lcd Chr(255)
Lcd Chr(2)
Lcd Chr(2)
___lcde = 1
Locate 1 , Digitpos 'Locate 3 , Digitpos 'line 3
Lcd Chr(2)
Lcd " "
Lcd Chr(255)
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd Chr(4) 'line 4
Lcd Chr(6)
Lcd Chr(0)
Return

Disp6:
___lcde = 0 'line 1
Locate 1 , Digitpos
Lcd Chr(1)
Lcd Chr(2)
Lcd Chr(3) 'Line 2
Locate 2 , Digitpos
Lcd Chr(255)
Lcd Chr(2)
Lcd Chr(3)
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd Chr(255)
Lcd " "
Lcd Chr(255) 'line 4
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd Chr(4)
Lcd Chr(6)
Lcd Chr(0)
Return

Disp7:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd Chr(1)
Lcd Chr(2)
Lcd Chr(3)
Locate 2 , Digitpos 'line 2
Lcd " "
Lcd " "
Lcd Chr(255)
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd " "
Lcd " "
Lcd Chr(255)
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd " "
Lcd " " 'line 4
Lcd Chr(4)
Return

Disp8:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd Chr(1)
Lcd Chr(2)
Lcd Chr(3)
Locate 2 , Digitpos 'line 2
Lcd Chr(255)
Lcd Chr(2)
Lcd Chr(255)
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd Chr(255)
Lcd " "
Lcd Chr(255) 'line 4
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd Chr(4)
Lcd Chr(6)
Lcd Chr(0)
Return

Disp9:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd Chr(1)
Lcd Chr(2)
Lcd Chr(3) 'line 2
Locate 2 , Digitpos
Lcd Chr(255)
Lcd " "
Lcd Chr(255)
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd Chr(4)
Lcd Chr(6)
Lcd Chr(255) 'line 4
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd Chr(4)
Lcd Chr(6)
Lcd Chr(0)
Return

Disp_dot:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd " "
Lcd " "
Lcd " " 'line 2
Locate 2 , Digitpos
Lcd " "
Lcd Chr(255)
Lcd " "
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd " "
Lcd Chr(255)
Lcd " " 'line 4
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd " "
Lcd " "
Lcd " "
Return

Disp_a:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd Chr(1)
Lcd Chr(2)
Lcd Chr(3) 'line 2
Locate 2 , Digitpos
Lcd Chr(255)
Lcd Chr(2)
Lcd Chr(255)
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd Chr(255)
Lcd " "
Lcd Chr(255) 'line 4
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd Chr(6)
Lcd " "
Lcd Chr(6)
Return

Disp_p:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd Chr(1)
Lcd Chr(2)
Lcd Chr(3) 'line 2
Locate 2 , Digitpos
Lcd Chr(255)
Lcd Chr(2)
Lcd Chr(7)
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd Chr(255)
Lcd " "
Lcd " " 'line 4
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd Chr(6)
Lcd " "
Lcd " "
Return

Disp_m:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd Chr(1)
Lcd Chr(2)
Lcd Chr(1) 'line 2
Locate 2 , Digitpos
Lcd Chr(255)
Lcd Chr(6)
Lcd Chr(255)
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd Chr(255)
Lcd " "
Lcd Chr(255) 'line 4
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd Chr(255)
Lcd " "
Lcd Chr(255)
Return

Disp_blank:
___lcde = 0
Locate 1 , Digitpos 'line 1
Lcd " "
Lcd " "
Lcd " " 'line 2
Locate 2 , Digitpos
Lcd " "
Lcd " "
Lcd " "
___lcde = 1 'line 3
Locate 1 , Digitpos 'Locate 3 , Digitpos
Lcd " "
Lcd " "
Lcd " " 'line 4
Locate 2 , Digitpos 'Locate 4 , Digitpos
Lcd " "
Lcd " "
Lcd " "
Return
 
Last edited: