Search found 20 matches

by Conrad_Turbo
13 September 2012, 9:40 AM
Forum: ZBasic Language
Topic: Control VFD Display - Serial
Replies: 16
Views: 3056

I knew I was missing that positioning command, I just didn't know how to add it... Do you see how the information in Section 7.9 of the datasheet was used to produce the positioning instruction? It will be very helpful to you if you can learn how to read a datasheet and then use the information to ...
by Conrad_Turbo
12 September 2012, 14:47 PM
Forum: ZBasic Language
Topic: Control VFD Display - Serial
Replies: 16
Views: 3056

Why does the code in Main() not call the SetPosVFD() routine? That would seem the sensible thing to do if you want to set the cursor position. Good question. I added it prior to the "WORLD" string. Even if you change that, however, you'll need to fix up the SetPosVFD() routine because it ...
by Conrad_Turbo
12 September 2012, 12:20 PM
Forum: ZBasic Language
Topic: Control VFD Display - Serial
Replies: 16
Views: 3056

Hmmm when I comment out: Public Sub SendByteVFD(ByVal b as Byte) Call putVFD(False, b) End Sub The program still works because the other subs are not calling up the SendByteVFD sub. All the writing to the VFD screen is done by putVFD(). I did some tweaking, but it's n...
by Conrad_Turbo
11 September 2012, 15:30 PM
Forum: ZBasic Language
Topic: Control VFD Display - Serial
Replies: 16
Views: 3056

Okay I changed: Const vfdOn as Byte = &H0e to: Const vfdOn as Byte = &H0c and found out &H0f will allow the cursor to blink. Cool! So the cursor is hidden. Now I'm still trying to figure out where to write the string to the 2nd line... Is it related to this? Const dataPrefixWrite as Unsi...
by Conrad_Turbo
11 September 2012, 9:31 AM
Forum: ZBasic Language
Topic: Control VFD Display - Serial
Replies: 16
Views: 3056

I had a couple more thoughts on this. Firstly, you'll probably want to put a pullup resistor on the strobe (STB) line. This will eliminate the possibility of inadvertently starting false cycles during power-up and initialization. Secondly, although the datasheet doesn't specify a required delay tim...
by Conrad_Turbo
10 September 2012, 14:19 PM
Forum: ZBasic Language
Topic: Control VFD Display - Serial
Replies: 16
Views: 3056

I'm terrible at writing code from scratch, I found an example to go off of. You wrote it. :D '----------------------------------------------------------------------------------------------------------- Option Explicit 'Output(s) Const DataPin as Byte = 17 'Serial Output Pin17 &#4...
by Conrad_Turbo
07 September 2012, 12:42 PM
Forum: ZBasic Language
Topic: Control VFD Display - Serial
Replies: 16
Views: 3056

Yep here it is Don.
by Conrad_Turbo
07 September 2012, 11:43 AM
Forum: ZBasic Language
Topic: Control VFD Display - Serial
Replies: 16
Views: 3056

Control VFD Display - Serial

I searched and couldn't find any sample code, I have played with LCD displays before but have come across some nice VFD displays that I want to use. It has 5 pins; Pin 1 - Power Supply Input - 5Vin Pin 2 - Data Input/Output Pin 3 - Ground Input Pin 4 - Strobe Input Pin 5 - Display Clock Input So Pin...
by Conrad_Turbo
07 September 2012, 11:36 AM
Forum: ZBasic Language
Topic: MO pushbutton to change status?
Replies: 17
Views: 4411

> LH1... ~5mH for my application. I used ~40 turns of #18 on a 5/8" ID ferrite toroid, an FT-82-77, I think - but it is not critical. All it needs to do is slow down the current rise of sharp spikes to prevent blowing up the Zeners (actually 600W TVSs, SM6T22As - small despite the brief large ...
by Conrad_Turbo
06 September 2012, 9:34 AM
Forum: ZBasic Language
Topic: MO pushbutton to change status?
Replies: 17
Views: 4411

Nice lightbar assemby! You did not ask, but I'll mention it anyway... Vehicles have incredibly noisy electrical systems, with bi-polar voltage spikes of various magnitudes and durations. This means one needs a very robust power supply for the micro for long term, reliable operation. Temperature ext...
by Conrad_Turbo
05 September 2012, 8:49 AM
Forum: ZBasic Language
Topic: MO pushbutton to change status?
Replies: 17
Views: 4411

No, not a separate task for each button. One task that repeats and checks each one individually. First, you need to determine how long you might have switch bounce. Most bounce for well less than 10 mS. But I saw a hardware debouncer that required a state change for more than 50mS to register the c...
by Conrad_Turbo
31 August 2012, 10:31 AM
Forum: ZBasic Language
Topic: MO pushbutton to change status?
Replies: 17
Views: 4411

You guys are awesome! It didn't work right off the bat but I played with the code a bit and it seems to be giving me a reliable output. :D I had the same general idea with the timer...but just had no idea how to implement it. The only question I have is how did you come to the determination of "...
by Conrad_Turbo
30 August 2012, 13:17 PM
Forum: ZBasic Language
Topic: MO pushbutton to change status?
Replies: 17
Views: 4411

Re: MO pushbutton to change status?

I have a ZE-24PE and have a momentary push button switch connected to Pin 5. Switches are challenging because of a phenomenon known as "contact bounce". When making or breaking contact, there are almost always several open-close cycles that can lead to false determination of switch status...
by Conrad_Turbo
30 August 2012, 12:13 PM
Forum: ZBasic Language
Topic: MO pushbutton to change status?
Replies: 17
Views: 4411

MO pushbutton to change status?

I don't use my Zbasic chip enough so I don't write enough code to be proficient at it...but I have a ZE-24PE and have a momentary push button switch connected to Pin 5. I want have some code that will monitor this pin for when the pushbutton is pressed and change the status of a variable. I have som...
by Conrad_Turbo
07 April 2011, 20:43 PM
Forum: ZBasic Language
Topic: Connecting ZX-24PE to Serial LCD+2
Replies: 11
Views: 6341

Don, thanks for the help! Adding the resistors did the trick, can't believe I missed them! I checked the data serially through the MAX232CPE, then had the serial data pass to the ZX24PE and debug.print with the above code. The output seems to be consistent now. Question for you, what would be the mo...