BasicMicro - Forums

www.basicmicro.com
It is currently Sat Feb 04, 2012 7:13 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: HSEROUT2 with a Scott edwards BPK serial LCD IC
PostPosted: Thu Aug 05, 2010 10:03 am 
Offline
Citizen

Joined: Fri Jul 16, 2010 11:13 am
Posts: 7
Hi,

I'm new to the Atom Pro 40m so need a bit of help please.

I'm using the BPK serial lcd chip from scott edwards to drive a 4x20 LCD

Using:

Serout 15,N9600,["hello"]

works fine, however when I try to use:

Enablehserial2
sethserial2 h9600,h8databits,hnoparity,h1stopbits
hserout2 ["hello"]

all i get is a load of triangles in every cursor position on the screen

The BPK needs 9600 baud, no parity, 8 data bits, 1 stop bit.

looking through the BS2 demo program it looks like the N9600 is inverted? Does the H9600 do the same thing?

thanks,

Jon


Top
 Profile  
 
 Post subject: Re: HSEROUT2 with a Scott edwards BPK serial LCD IC
PostPosted: Thu Aug 05, 2010 5:05 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 784
Location: Temecula, CA
hserial produces an inverted(eg i9600) style async serial signal. This is a limitation of the H8 processors UARTs. There is no way to switch to a non-inverted signal in the processor. You will have to put an inverter on your serial line to use the hardware serial port with the BPK.

The BPK is setup to connect directly to a PC without using an inverter(like a MAX232). So to use it with the hardware serial on the AtomPro you have to use an external inverter. You don't want to use a MAX232 because thats over kill(designed to handle +-12 and higher input voltages). A simple hex inverter like the 74hc04 should suffice.

_________________
Nathan Scherdin
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: HSEROUT2 with a Scott edwards BPK serial LCD IC
PostPosted: Fri Aug 06, 2010 1:50 am 
Offline
Citizen

Joined: Fri Jul 16, 2010 11:13 am
Posts: 7
Hi AcidTech,

thanks for the info.... Bug*er! I've already had the circuit boards produced :cry: Could I use a 2n7000 fet to acheive the same? I've got loads and it would be easy to tack onto the board.

I've got a bigger problem than that, the BPK doesn't seem to allow for right justification for when you show a counter which is a major pain, so instead of displaying 00001, 00002... 00010,00011 etc. it's shows 10000,20000....10000, 11000 etc. I've emailed Scott Edwards support, but haven't had a reply, anybody out there know if the BPK has a command code to do it? there isn't one listed in the BPK's manual.

thanks

Jon


Top
 Profile  
 
 Post subject: Re: HSEROUT2 with a Scott edwards BPK serial LCD IC
PostPosted: Fri Aug 06, 2010 9:15 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 784
Location: Temecula, CA
Note sure about the fets.

As for the justification problem, send text instead of numbers. If you can do that then our processor can create the correctly justified text. In the serout comands do this:

[dec5 myval\5]

the dec5 forces a max of 5 characters to be generated when converting the number to ASCII an the \5 forces a minimum of 5 characters to be generated. The extra characters are 0s. So if myval = 13 you will output to the serial device "00013" characters.

_________________
Nathan Scherdin
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: HSEROUT2 with a Scott edwards BPK serial LCD IC
PostPosted: Wed Aug 11, 2010 1:19 am 
Offline
Citizen

Joined: Fri Jul 16, 2010 11:13 am
Posts: 7
Acidtech wrote:
Note sure about the fets.

As for the justification problem, send text instead of numbers. If you can do that then our processor can create the correctly justified text. In the serout comands do this:

[dec5 myval\5]

the dec5 forces a max of 5 characters to be generated when converting the number to ASCII an the \5 forces a minimum of 5 characters to be generated. The extra characters are 0s. So if myval = 13 you will output to the serial device "00013" characters.


That is exactly what I needed, thank you AcidTech, the only bit I had left off my code was the \5 to force the 5 characters!!

thanks again

Jon


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 2 guests


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 post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO