Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

M128 problem

 
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 Archive
View previous topic :: View next topic  
Author Message
komisarios

Bascom Member



Joined: 17 Jun 2006
Posts: 38

greece.gif
PostPosted: Fri Sep 12, 2014 12:40 pm    Post subject: M128 problem Reply with quote

Hi there,

I run a demo version 2.0.7.3 on a M128 (fuse as M128-not M103) and i found a problem:

I use an input (pin 17) that when is connected to +5V , the lcd is supposed to write "OK"

But regardless the input if it is 0V or 5V , the mcu constantly prints OK.

'DDRB=&B00000000 (also tried that)
Config Pinb.7 = input
'Reset Portb.7 (also tried that)

Do
Nop
Loop Until Pinb.7 = 1
Lcd "OK"
End


(BASCOM-AVR version : 2.0.7.3 , Latest : 2.0.7.7 )
Back to top
View user's profile
six1

Bascom Expert



Joined: 27 Feb 2009
Posts: 553

germany.gif
PostPosted: Fri Sep 12, 2014 6:05 pm    Post subject: Reply with quote

Code:
$regfile = "m128def.dat"
   $crystal = 8000000
   $hwstack = 16
   $swstack = 16
   $framesize = 16


Config Portb.7 = input
Portb.7 = 1 'Set Pullup

Do
   if Pinb.7 = 1 then
     Lcd "1"
   else
     Lcd "0"
   end if
loop
End

_________________
For technical reasons, the signature is on the back of this message.
Back to top
View user's profile
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 Archive 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