OSD MAX 7456-al

Hogyan programozzak AVR chipet? Programozók beállításai...
Bascom nyelvű programok...
Válasz küldése
Avatar
Mansell
DrótVégénSzéndarab
Hozzászólások: 15
Csatlakozott: 2011. január 18. kedd, 7:00

OSD MAX 7456-al

Hozzászólás Szerző: Mansell »

Sziasztok!

Épített valaki OSD kapcsolást MAX7456-os IC-vel?

Én MEGA16 ra kötöttem de nem működik.

Ezt a panelt vettem meg:
http://www.robotshop.ca/sfe-breakout-fo ... splay.html

És ez alapján dolgoztam vele:
http://evertdekker.com/Joomla/index.php ... &Itemid=84

Gondoltam, alapból van benne karakterkészlet.

Van, vagy külön fel kell tölteni mert üres?

Köszi: András
Avatar
Robert
Elektronbűvölő
Hozzászólások: 10213
Csatlakozott: 2005. december 9. péntek, 7:00

Hozzászólás Szerző: Robert »

http://www.sparkfun.com/products/9168


Mit csinál? Elvileg van benne karakterkészlet....
Avatar
broland
Tranzisztorgyógyász
Hozzászólások: 152
Csatlakozott: 2009. április 20. hétfő, 6:00

Hozzászólás Szerző: broland »

Szia

Szerintem "csak" 32-vel el van tolva az ASCII-hoz képest a karakter táblája.

Ebben a kódrészletben írja le.

Kód: Egész kijelölése

Sub Videotext(byval Text As String , Byval Ypos As Byte , Byval Xpos As Byte)
Local Charcount As Byte , Tempstring As String * 1 , Tempbyte As Byte , Position As Word , Chars As Byte , Controlcharcount As Byte , Attribute As Byte
Controlcharcount = 0 : Attribute = 0                        'Set the local variable to zero
Charcount = Len(text) - 1                                   'Count the number of characters in the string minus, because we must start at 0
For Chars = 0 To Charcount                                  'do the loop as much as there are characters
 Position = Ypos * 30                                       'Position where the characters must be showed 30=characters per line
 Position = Position + Xpos                                 'Position + the xpos
 Position = Position + Chars                                'Position + the charactercount that's handled this loop
 Position = Position - Controlcharcount                     'There was a controle charater, deduct from the charactercount because it must not be handled as real character
 Regdata = High(position)                                   'Put the highbyte of position in the regdatabuffer
 Writereg Dmah , Regdata                                    'Write the data to the register
 Regdata = Low(position)                                    'Put the lowbyte of position in the regdatabuffer
 Writereg Dmal , Regdata                                    'Write the data to the register
  Tempbyte = Chars + 1                                      'Need the character position from the textstring
 Tempstring = Mid(text , Tempbyte , 1)                      'Take out 1 character that we need to handle now
 Tempbyte = Asc(tempstring)                                 'Get the ascii value of this character
  If Tempbyte < 130 Then                                    'Character larger then 130 are controle characters
   Tempbyte = Tempbyte - 32                                 'Max7456 character table starts at &H00, so deduct 32 to get it even with the ascii table
   Regdata = Lookup(tempbyte , Characterslookup)            'Lookup the character from the datatable
   Writereg Dmdi , Regdata                                  'Write the data to the DisplayMemory register
  Else
   Incr Controlcharcount                                    'It's a controle character, increase the counter
   If Tempbyte = 131 Then Set Attribute.7                   'Set the local background bit in the character attribute
   If Tempbyte = 132 Then Reset Attribute.7                 'Reset the local background bit
   If Tempbyte = 133 Then Set Attribute.6                   'Set the blink bit
   If Tempbyte = 134 Then Reset Attribute.6                 'Reset the blink bit
   If Tempbyte = 135 Then Set Attribute.5                   'Set the inverse bit
   If Tempbyte = 136 Then Reset Attribute.5                 'Reset the inverse bit
  End If
 Regdata = High(position)                                   'Put the highbyte of position in the regdatabuffer
 Regdata = Regdata Or &B00000010                            'Set bit1 for the character attribute
 Writereg Dmah , Regdata                                    'Write the data to the register
 Regdata = Low(position)                                    'Put the lowbyte of position in the regdatabuffer
 Writereg Dmal , Regdata                                    'Write the data to the register
 Writereg Dmdi , Attribute                                  'Write the attribute to the DisplayMemory register
Next Carcount
End Sub

Characterslookup:
'Convert the ascii table to the Max7456 table. (Not excist) are characters that are not in the MAX7456 table and will show a ? (&H42)
Data &H00                                                   '32 Space
Data &H42                                                   '33 !  (not excist)
Data &H48                                                   '34 ""
Data &H42                                                   '35 # (not excist)
Data &H42                                                   '36 $ (not excist)
Data &H42                                                   '37 % (not excist)
Data &H42                                                   '38 & (not excist)
Data &H47                                                   '39 '
Data &H3F                                                   '40 (
Data &H40                                                   '41 )
Data &H42                                                   '42 * (not excist)
Data &H50                                                   '43 + (not excist)
Data &H45                                                   '44 ,
Data &H49                                                   '45 -
Data &H41                                                   '46 .
Data &H47                                                   '47 /
Data &H0A                                                   '48 0
Data &H01                                                   '49 1
Data &H02                                                   '50 2
Data &H03                                                   '51 3
Data &H04                                                   '52 4
Data &H05                                                   '53 5
Data &H06                                                   '54 6
Data &H07                                                   '55 7
Data &H08                                                   '56 8
Data &H09                                                   '57 9
Data &H44                                                   '58 :
Data &H43                                                   '59 ;
Data &H4A                                                   '60 <
Data &H42                                                   '61 = (not excist)
Data &H4B                                                   '62 >
Data &H42                                                   '63 ?
Data &H4C                                                   '64 @
Data &H0B                                                   '65 A
Data &H0C                                                   '66 B
Data &H0D                                                   '67 C
Data &H0E                                                   '68 D
Data &H0F                                                   '69 E
Data &H10                                                   '70 F
Data &H11                                                   '71 G
Data &H12                                                   '72 H
Data &H13                                                   '73 I
Data &H14                                                   '74 J
Data &H15                                                   '75 K
Data &H16                                                   '76 L
Data &H17                                                   '77 M
Data &H18                                                   '78 N
Data &H19                                                   '79 O
Data &H1A                                                   '80 P
Data &H1B                                                   '81 Q
Data &H1C                                                   '82 R
Data &H1D                                                   '83 S
Data &H1E                                                   '84 T
Data &H1F                                                   '85 U
Data &H20                                                   '86 V
Data &H21                                                   '87 W
Data &H22                                                   '88 X
Data &H23                                                   '89 Y
Data &H24                                                   '90 Z
Data &H42                                                   '91 [ (not excist)
Data &H42                                                   '92 \ (not excist)
Data &H42                                                   '93 ] (not excist)
Data &H42                                                   '94 ^ (not excist)
Data &H42                                                   '95 Underscore (not excist)
Data &H42                                                   '96 ` (not excist)
Data &H25                                                   '97 a
Data &H26                                                   '98 b
Data &H27                                                   '99 c
Data &H28                                                   '100 d
Data &H29                                                   '101 e
Data &H2A                                                   '102 f
Data &H2B                                                   '103 g
Data &H2C                                                   '104 h
Data &H2D                                                   '105 i
Data &H2E                                                   '106 j
Data &H2F                                                   '107 k
Data &H30                                                   '108 l
Data &H31                                                   '109 m
Data &H32                                                   '110 n
Data &H33                                                   '111 o
Data &H34                                                   '112 p
Data &H35                                                   '113 q
Data &H36                                                   '114 r
Data &H37                                                   '115 s
Data &H38                                                   '116 t
Data &H39                                                   '117 u
Data &H3A                                                   '118 v
Data &H3B                                                   '119 w
Data &H3C                                                   '120 x
Data &H3D                                                   '121 y
Data &H3E                                                   '122 z
Data &H42                                                   '123 {  (not excist)
Data &H42                                                   '124 |  (not excist)
Data &H42                                                   '125 }  (not excist)
Data &H42                                                   '126 ~  (not excist)

Avatar
nobody_hun
Bitfaragó
Hozzászólások: 425
Csatlakozott: 2005. november 14. hétfő, 7:00

Hozzászólás Szerző: nobody_hun »

Plusz ne feledjük PAL-ra állítani!
8)
"Az IC-k füsttel működnek. Ha kijön belőlük a füst, nem működnek tovább." - ismeretlen szerző
"Az ID:FFFFFF egyenlő az Atmel még nem kiadott processzorával."
Avatar
Mansell
DrótVégénSzéndarab
Hozzászólások: 15
Csatlakozott: 2011. január 18. kedd, 7:00

Hozzászólás Szerző: Mansell »

nobody_hun írta:Plusz ne feledjük PAL-ra állítani!
8)
Milyen IC vel próbálkoztál?

Én mega 16-al és BAscommal.

Üdv: András
Avatar
Robert
Elektronbűvölő
Hozzászólások: 10213
Csatlakozott: 2005. december 9. péntek, 7:00

Hozzászólás Szerző: Robert »

Chipfüggetlen a dolog.....
Avatar
GPeti
Bitmanipulátor
Hozzászólások: 131
Csatlakozott: 2011. március 3. csütörtök, 7:00

Hozzászólás Szerző: GPeti »

Robert írta:Chipfüggetlen a dolog.....
Ez egyszerűbb, a képernyő közepére kiírja memória tartalmát, a soros busz szoftveres.

Kód: Egész kijelölése

$regfile = "m64def.dat"
$crystal = 11000000
$framesize = 320
$hwstack = 160
$swstack = 160

Cs Alias Porte.3
Da Alias Porte.4
Cl Alias Porte.2
'Di Alias Port
Config Portc.5 = Output
Config Cs = Output
Config Da = Output
Config Cl = Output

Declare Sub Sendcom(byval Adre As Byte , Byval Dat As Byte)
Declare Sub Putchar(byval Char As Byte , Byval X As Byte , Byval Y As Byte)
Call Sendcom(0 , &B01001010)
Waitms 10
Call Sendcom(0 , &B01001000)
Call Sendcom(1 , &B00000010)
Call Sendcom(2 , &B00100100)
Call Sendcom(3 , &B00010011)
Call Sendcom(4 , &B00001000)
'Call Putchar( "S" , 10 , 8)
'Call Putchar( "Z" , 11 , 8)
'Call Putchar( "I" , 12 , 8)
'Call Putchar( "A" , 13 , 8)
'Call Putchar( " " , 14 , 8)
'Call Putchar( "M" , 15 , 8)
'Call Putchar( "A" , 16 , 8)
'Call Putchar( "K" , 17 , 8)
'Call Putchar( "K" , 18 , 8)
'Call Putchar( "A" , 19 , 8)
'Call Putchar( "0" , 20 , 8)
Dim I As Byte , J As Byte , Temp As Byte
I = 0
J = 0
Do
Waitms 500
Temp = J
Call Putchar(temp , 11 , 8)

Incr J


Toggle Portc.5
Loop

End

Sub Putchar(byval Char As Byte , Byval X As Byte , Byval Y As Byte)


Local Ch As Byte
Local Tmp As Word
Tmp = Y * 30
Tmp = Tmp + X
Ch = High(tmp)
Call Sendcom(5 , Ch)
Ch = Low(tmp)
Call Sendcom(6 , Ch)
'Ch = Asc(char) - 54
Ch = Temp
Call Sendcom(7 , Ch)
End Sub

Sub Sendcom(byval Adre As Byte , Byval Dat As Byte)
Reset Cs
Waitus 5
Shiftout Da , Cl , Adre , 1
Waitus 5
Shiftout Da , Cl , Dat , 1
Waitus 5
Set Cs
End Sub
Avatar
GPeti
Bitmanipulátor
Hozzászólások: 131
Csatlakozott: 2011. március 3. csütörtök, 7:00

Hozzászólás Szerző: GPeti »

Sok esetben teljesen felesleges drága osd ic-t venni, a szöveget ki lehet íratni az SPI MOSI kimenetével a képernyőre, kell egy szinkron jel leválasztó áramkör ami több megoldás lehet. Most találtam egy arduino-s programot, régebben bascom-mal is próbálkoztam de nem lett valami jó.
Válasz küldése