K8063

I have the display working after assembly. I let it go through its count and pulled the jumper off at the count of ONE. ( I only have one display right now. Is this ok so far ?
I am trying the code as per example page 16 in your manual.
I am using a parallax stamp micro controller.
Its not working so far.Here is my code

DO
SEROUT 5,396,[13,1,82,1,152]

SEROUT 5,16780,[13,1,65,48,129]

PAUSE 100
SEROUT 5,396,[13,8,83,1,151]
DEBUG 83
LOOP
I do not under stand the last byte,Could you explain how to add the bytes for 2 compliement. Giving a example if possible. I am using a max 232 inter face chip,how can i trouble shoot the problem.
I do have a scope

Simply make the 8-bit sum of all bytes and perform a ‘COMF’ on the result.

Are you that busy,you could not give a example?

A search of " COMF ’ produces nothing

COMF is the invert command in Microchip assembler. If you do a search for it, you will find it.

And yes, the people at Velleman do have a live next to administering this forum… You can’t ask them to learn you to program just because you have bought a kit of them. A car seller also doesn’t give you driving lessons for free.

Please be a bit more respectful to the wonderful people at Velleman.

Note: I don’t have a K8063. Anyhow, I thought COMF builds the 1’s complement. The K8063 documentation says that the checksum is the 2’s complement of the previous 4 command bytes.

jonw: The checksum for your Reset command is wrong. Further, why is the baudrate value of the second SEROUT (A-command) in your code not also 396?

[quote=“MostlyHarmless”]Note: I don’t have a K8063. Anyhow, I thought COMF builds the 1’s complement. The K8063 documentation says that the checksum is the 2’s complement of the previous 4 command bytes.

jonw: The checksum for your Reset command is wrong. Further, why is the baudrate value of the second SEROUT (A-command) in your code not also 396?[/quote]

…I was trying both baud rates…inverted and non inverted

I have the display working now,from a microcontroller.

I have two questions.
I can not get the velleman cable ( discontinoued ) can I go to any Electronic store and ask for a usb to serial cable,or are there many types?

#2 I want to run the demo software ( down loaded from the site) but I do not have the cable installed,Is this why I get a error,RUN-TIME error invaild port,Can i not run the software without the cable attached?

[quote=“laserguy”]COMF is the invert command in Microchip assembler. If you do a search for it, you will find it.

And yes, the people at Velleman do have a live next to administering this forum… You can’t ask them to learn you to program just because you have bought a kit of them. A car seller also doesn’t give you driving lessons for free.

Please be a bit more respectful to the wonderful people at Velleman.[/quote]
laser boy Just look at a list of replys from velleman you will see the time spend to dicuss or explian most topics are very poor. I would suggest you have a interest because you are a dealer then try to help make the site more usefull,instead you can not accept when someone sees fault here

[quote=“jonw”][quote=“MostlyHarmless”]Note: I don’t have a K8063. Anyhow, I thought COMF builds the 1’s complement. The K8063 documentation says that the checksum is the 2’s complement of the previous 4 command bytes.

jonw: The checksum for your Reset command is wrong. Further, why is the baudrate value of the second SEROUT (A-command) in your code not also 396?[/quote]

…I was trying both baud rates…inverted and non inverted[/quote]

No, you tried to use two different stop-bit modes with the same baudrate, number of bits and parity inside the same code fragment. I have the feeling that you have little knowledge about how serial communication actually works. Sending messages in 2400 8N1, then 8N0 and again in 8N1 cannot work. It never has and never was supposed to. Doing so just confuses the receiver.

The K8063 wants 2400 8N1 communication. Use that and only that.

The demo software will not run if it does not detect a COM1 or COM2 port.
Basically, it should work with any USB to serial converter.

Thanks velleman support, So i am sure i understand,the demo software will not run untill i get the usb to serial cable installed,correct? Again thanks for the help

@ Helping hand,Your right I have never used serial communication before,but thats the beauty of getting help here.
I agree baud rate may have been the wrong word…Thanks for you reply

[quote=“jonw”]@ Helping hand,Your right I have never used serial communication before,but thats the beauty of getting help here.
I agree baud rate may have been the wrong word…Thanks for you reply[/quote]

Looking at the code you were sharing on the Parallax forum it is apparent that you haven’t done much programming before this either. This is just an observation and in no way meant condescending. Welcome to the world of teaching high speed idiots (computers) what to do.

As somebody, who has started on that same journey over 30 years ago, may I give you some advice? Playing with hardware and microcontrollers is fun. But it can also be very frustrating because you have many possible sources of error at once. Trying to control a Velleman display with a Parallax microcontroller via RS232 includes possible coding problems, wiring problems and possible communication parameter problems.

Do yourself a favor. Stop fiddling with a microcontroller and attached hardware until you have a grasp of programming in general. Since you ultimately want to master that Parallax BASIC Stamp, a very simple BASIC dialect like QBASIC would be a good starting point. Not everything you learn from playing with QBASIC will work on the Stamp, but you will learn all the fundamental things about programming. And you will learn them much faster since QBASIC is an interactive interpreter. It is old MS-DOS command prompt stuff, but that is perfect for this purpose. The fundamental building blocks of loops, conditionals, variables, arrays and subroutines (functions) are similar to most programming languages.

You can download qbasic V1.1 for free here: petesqbsite.com/sections/int … ntro.shtml (unfortunately this only works on 32 bit systems - there is a QB64 somewhere). Find a tutorial that teaches you all about variables, loops, conditionals and so on. In no time you will understand that the “countdown” timer code, you posted on the other forum, literally screams “use a loop”. Your code should look more like this:

[code]SEROUT 5,396,[13,8,82,1,152]

DO
FOR i = 57 TO 48 STEP -1
SEROUT 5,396,[13,1,65,i,(65536 - 79 - i) MOD 256]
SEROUT 5,396,[13,8,83,1,151]
PAUSE 100
NEXT i
LOOP[/code]