Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

I need help understanding what's wrong with the sed1330 rout

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Unsupported versions
View previous topic :: View next topic  
Author Message
Porelo

Bascom Member



Joined: 23 May 2005
Posts: 39
Location: Portugal

portugal.gif
PostPosted: Thu Dec 07, 2017 3:06 pm    Post subject: I need help understanding what's wrong with the sed1330 rout Reply with quote

I need help for "sed1330", with the lib available in the forum I can not that it works does nothing, compiler without errors, but it does not work what can be wrong ??

this is the test code

'*************************************************************
$regfile = "m128def.dat" ' specify the used micro
$crystal = 8000000 ' used crystal frequency
$baud = 38400 ' use baud rate
$hwstack = 550 ' default use 32 for the hardware stack
$swstack = 550 ' default use 10 for the SW stack
$framesize = 430 ' default use 40 for the frame space


$lib "glcd-sed1330.lib"
Const Lcd_x_size = 320
Const Lcd_y_size = 240


'DEFENIÇÃO DO LCD
Config Graphlcd = 320 * 240sed1330 , Dataport = Porta , Controlport = Portc , Reset = 4 , Rd = 2 , Wr = 0 , Cs = 7 , A0 = 3 , Osc = 10000000

'CONFIG PORTA = OUTPUT
'CONFIG PORTC = OUTPUT

'Dim variables (y not used)

Dim X As Byte , Y As Byte


'Clear the screen will both clear text and graph display

'Cls

'Other options are :

' CLS TEXT to clear only the text display

' CLS GRAPH to clear only the graphical part



'Cursor Off



Wait 1

'locate works like the normal LCD locate statement

' LOCATE LINE,COLUMN LINE can be 1-8 and column 0-30


Locate 1 , 1


'Show some text

Lcd "MCS Electronics"

'And some othe text on line 2

Locate 2 , 1 : Lcd "T6963c support"

Locate 3 , 1 : Lcd "1234567890123456789012345678901234567890"

Locate 16 , 1 : Lcd "write this to the lower line"



Waitms 10



Cls Text





'use the new LINE statement to create a box

'LINE(X0,Y0) - (X1,Y1), on/off

Line(0 , 0) -(239 , 127) , 255 ' diagonal line

Line(0 , 127) -(239 , 0) , 255 ' diagonal line

Line(0 , 0) -(240 , 0) , 255 ' horizontal upper line

Line(0 , 127) -(239 , 127) , 255 'horizontal lower line

Line(0 , 0) -(0 , 127) , 255 ' vertical left line

Line(239 , 0) -(239 , 127) , 255 ' vertical right line





Wait 10

' draw a line using PSET X,Y, ON/OFF

' PSET on.off param is 0 to clear a pixel and any other value to turn it on

For X = 0 To 140

Pset X , 20 , 255 ' set the pixel

Next



For X = 0 To 140

Pset X , 127 , 255 ' set the pixel

Next



Wait 10



'circle time

'circle(X,Y), radius, color

'X,y is the middle of the circle,color must be 255 to show a pixel and 0 to clear a pixel

For X = 1 To 10

Circle(20 , 20) , X , 255 ' show circle

Wait 1

Circle(20 , 20) , X , 0 'remove circle

Wait 1

Next



Wait 2



For X = 1 To 10

Circle(20 , 20) , X , 255 ' show circle

Waitms 200

Next

Wait 10

'Now it is time to show a picture

'SHOWPIC X,Y,label

'The label points to a label that holds the image data

'Test:
'
'Showpic 0 , 0 , Plaatje
'
'Showpic 0 , 64 , Plaatje ' show 2 since we have a big display
'
'Wait 2
'
'Cls Text ' clear the text
'
End







'This label holds the mage data

Plaatje:

'$BGF will put the bitmap into the program at this location

$bgf "mcs.bgf"



'You could insert other picture data here

(BASCOM-AVR version : 2.0.8.0 , Latest : 2.0.7.8 )
Back to top
View user's profile Yahoo Messenger
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5922
Location: Holland

blank.gif
PostPosted: Thu Dec 07, 2017 9:16 pm    Post subject: Reply with quote

It is usually a good idea to simply toggle the pins and see if they work.
like :

config portc=output
do
toggle portc
waitms 1000
loop


do this for all pins you use. then connect the LCD.
Also, make sure the LCD is good and that it is indeed the type you think it is.

_________________
Mark
Back to top
View user's profile Visit poster's website
Evert :-)

Bascom Expert



Joined: 18 Feb 2005
Posts: 2156

netherlands.gif
PostPosted: Thu Dec 07, 2017 10:39 pm    Post subject: Reply with quote

Did you disabled the M103 compatible fusebit?
_________________
www.evertdekker.com Bascom code vault
Back to top
View user's profile Visit poster's website
Porelo

Bascom Member



Joined: 23 May 2005
Posts: 39
Location: Portugal

portugal.gif
PostPosted: Fri Dec 08, 2017 1:10 am    Post subject: Reply with quote

thanks for the replies, disabled the M103 compatible fuse bit? = yes, it is in 128 mode.

In the hardware issue it works fine with any different lcd, I have 3 lcd (s) 2 with the same reference 1 different , but with the same results in all not working at all, even changing ports, I think the problem is the lib , which is this "https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=9540&highlight=sed1330".
I also changed sed1330 and memory ram with the same result, I have no idea what it might be, I've tried almost everything I do not know what to do.
Back to top
View user's profile Yahoo Messenger
JC

Bascom Member



Joined: 15 Dec 2007
Posts: 586
Location: Cleveland, OH

usa.gif
PostPosted: Fri Dec 08, 2017 7:47 pm    Post subject: Reply with quote

I don't have a seg1330 data sheet in front of me, but I'll still share a thought or two.

If you have a POT for contrast, have you tried adjusting it?
Have you measured it's output voltage?

If the display used a register to set the contrast, have you tried changing that?

Some displays take a long time to boot up internally.
Try, at least for now, putting a several second delay at the very start of your code, so that the display can boot up on power up before the micro sends it any commands. When you have it working, you can shorten the delay.

JC
Back to top
View user's profile Visit poster's website
Porelo

Bascom Member



Joined: 23 May 2005
Posts: 39
Location: Portugal

portugal.gif
PostPosted: Sun Aug 26, 2018 10:55 pm    Post subject: Reply with quote

My apologies for the percistence, but after testing a large number of "8" lcds with the sed1330f I think I have reached the conclusion only can be the library that is not correct or incomplete, can anyone confirm or help?

(BASCOM-AVR version : 2.0.8.0 , Latest : 2.0.7.8 )
Back to top
View user's profile Yahoo Messenger
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Mon Aug 27, 2018 9:08 am    Post subject: Re: I need help understanding what's wrong with the sed1330 Reply with quote

Porelo wrote:
Code:
$lib "glcd-sed1330.lib"

Where this lib is from?
My actual Bascom-version doesn't know it, I get a lib-not-found compile error.
Back to top
View user's profile
Porelo

Bascom Member



Joined: 23 May 2005
Posts: 39
Location: Portugal

portugal.gif
PostPosted: Mon Aug 27, 2018 10:34 am    Post subject: Reply with quote

Here

https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=9540&highlight=sed1330
Back to top
View user's profile Yahoo Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Unsupported versions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum