The program you have given is not showing the code that are stored in QS EEPROM ....!!
and can i use my 16x2 LCD display with QS without any extra chip??
I was trying to use it without any controller but is is going very hard for me. The LCD display was not working properly now i am thinking to use it by QS micro controller...
Interesting. I'll have to try your program. I understand the FullDuplexSerial use, but what is the display device? One's own computer with some app to receive and display the info? I've not yet gotten into this debug aspect yet. It sounds like one needs a monitor. I have a QuickStart board and realize it is pretty powerful for its small size. I've made a mezzanine board to i/f TVout and plan to also include a 24 x 1 LCD I got a few years ago but never used.
Harley,
I'm just using the Parallax Serial Terminal. It uses the same connection used to load the program. I think the PST is probably the easiest way to display debug information. I'm already at the computer to program the Prop so I might as well use it to display the debug info.
The above is an EEPROM dump of a different program I'm working on. Using this program I see I have a bug in the EEPROM dump program or the program shown in the partial dump. The first 512 bytes are all $FF. I don't think that is supposed to be the case with either program.
I think this could be a useful debugging tool for programs that modify the EEPROM.
If someone sees a bug in the code I attached to the earlier post, please let me know.
Just to be clear. The QuickStart is not a microcontroller. QuickStart is the name of the board to demonstrate the Propeller microcontroller.
You say you have a 16x2 LCD display. That is not much information. I think there are very many 16x2 LCD displays. Many of them do not need extra chips to use with the Propeller microcontroller. There are several drivers for LCD displays in the OBEX.
Is it necessary to dump the ROM contents and to convert it back to Spin/ASM? I learned a lot of programming and seldom translate the ROM contents (only in my college's microcontroller assignments and exercises from the textbook, perhaps).
So my advice is:
always save a working codeversion in this way: if it does work save it under the current name. Then do a "save as..." with a new version number BEFORE changing anything.
Only AFTER saving with a new version-number in the filename start changing the working code to expand your code. This will assue that you can always do a rollback to a working codeversion.
The description of the DUMP command is in a PDF file called "FemtoBasic Manual" included in the archive for DongleBasic. It's called "FemtoBasic" because DongleBasic is just a special version of FemtoBasic intended for a Propeller board called the Propeller Dongle. This board uses your PC as its terminal unlike FemtoBasic which uses a TV or VGA display and a PS/2 keyboard for its terminal. The QuickStart board is close enough to the Dongle in design so that DongleBasic can be used.
The contents of the EEPROM is a compiled Spin/Assembly program, just like an .EXE file on your PC. You can't convert the compiled program back into its source file. There are programs called disassemblers and decompilers that will attempt to do this, but a lot of the information in the original program is missing, like variable names. Sometimes, the disassembler or decompiler will miss things and the resulting source file may not work or not do what the original program does.
After so much discussion on disassembler,etc..........
I want connect my 8bit 16 character x 2 lines LCD display to QS board, but how without any extra chip..!!
Please post the .spin code of it..!!
After so much discussion on disassembler,etc..........
I want connect my 8bit 16 character x 2 lines LCD display to QS board, but how without any extra chip..!!
Please post the .spin code of it..!!
What's so hard about a Google search with "KS0066" and "Propeller" for search terms ?
That's not what this forum is here for. As mentioned before, you have to do some of the work. P J Allen suggested you look through the Object Exchange. In the Display section, I see at least 8 or 10 different LCD display drivers in the first few screens of objects. One or more of them are likely to work depending on the details of your display. There are many different 16x2 LCDs, but most of them use the same controller chip or its equivalent. It's your job to get the datasheet for your display and either look through it yourself to see if it's one of the types supported by one of the objects in the Object Exchange or post it here and ask for opinions.
I have got Quick start micro controller board, but i have no idea how to use it as i think it require a software for using........!!
Please help..........
Thanks.
Back to square one.
The Quick Start Board is nothing but a PC board with a Propeller Chip, EEPROM, crystal on it. It is not unlike the Propeller Proto Board, and any other general purpose Propeller development boards.
The Quick Start Board can use the curriculum in the Propeller Education Kit series. I suggest use download the PDF's here:
Connect the D0-D7 to the port you want, and the R/S, E, R/W to the other ports. Of course, connect the +5V to the respective supply line, and the grounds too. Contrast? Connect a potentiometer on it.
Most of the stuff in the datasheet and internet are probably self-explanatory.
The better focus for the thread OP is to write stuff on the 16x2 LCD by using the Propeller, not accessing bits of the Prop clock-mode registers. If he could write "Hello World!" on the LCD many is already learned at start.
A good book by Harprit Singh about the SPIN language is a worth buy, and he explained many fundamentals for the Propeller. It is my best birthday present for me.
The OUTA register is set to1 as output and 0 as input
but we write this code in .spin as !outa[16..23] , if we write code like this outa[16..23] := $FF the output remain high even when we add delay....
please explain why, this happen ??
"The OUTA register is set to1 as output and 0 as input"
No. You're talking about the DIRA register.
The DIRA register sets whether an I/O pin is an output or an input. If the DIRA bit is a 0, the I/O pin output driver transistors are turned off (disconnected).
The OUTA register holds the possible output state of the I/O pins. If DIRA[x] is a 1, then OUTA[x] is connected to the I/O pin output driver transistors.
The INA register always contains the state of the I/O pins. If an I/O pin is set as an output, INA still shows the state of the I/O pin (controlled in this case by OUTA).
There's a nice diagram on the Propeller Downloads page and in the Propeller Manual and the Propeller Datasheet that shows how all the I/O registers are connected and how they work functionally.
it's always the same with you. You are asking things that you could easy answer yourself if you would read MORE in the manual or if you would test things out yourself
outa[1] := $FE stays zero as the "1" adresses only a single bit
look up in the manual what the command !outa[1] does
keep reading the manual first before asking obvoius things
outa[1] := $FE stays zero as the "1" addresses only a single bit
For e.g.:- If i write
PUB main
dira[16..23]~~ or :=$ff or :=%1111_1111 ' setting direct reg. to output. i.e.1 repeat
!outa[16...23] ' ! is an not operator
waitcnt ( 3_000_000 + cnt) ' this program while have blinking of led at delay of 3_000_0000 cyles of clock freq.
But, when this code is executed the output remain only high why not led blink??
PUB main2
Dira[16..23]~~ or etc....
repeat
OUTA[16..23] :=$ff or :=%1111_1111 or ~~ or SPR [4] :=$ff ' setting output reg. to output i.e. 1
waitcnt( 3_000_000 + cnt )
But, when this code is executed the output remain only high why not led blink??
PUB main2
Dira[16..23]~~ or etc....
repeat
OUTA[16..23] :=$ff ' setting output reg. to output i.e. 1
waitcnt( 3_000_000 + cnt )
Your comment says it sets the output to 1 (high). It does that every time it runs through the loop. How do you expect a constant high level to make the LED blink? $FF > $FF > $FF > $FF ...
OTOH, in the first example you use the bit-wise NOT operator (!outa[16..23]). Which is equivalent to outa[16..23] := outa[16..23] ^ $FFA (bit-wise XOR) which toggles the bits every time it runs through the loop. So assuming it starts with $00 (default setting) you'll get $00 > $FF > $00 > $FF ... See the difference?
Your comment says it sets the output to 1 (high). It does that every time it runs through the loop. How do you expect a constant high level to make the LED blink? $FF > $FF > $FF > $FF ...
$FF > $FF > $FF > $FF .... what does it do??
OTOH, in the first example you use the bit-wise NOT operator (!outa[16..23]). Which is equivalent to outa[16..23] := outa[16..23] ^ $FFA (bit-wise XOR) which toggles the bits every time it runs through the loop. So assuming it starts with $00 (default setting) you'll get $00 > $FF > $00 > $FF ... See the difference?
please elaborate this there is no symbol in ^ in .spin, and A
Comments
The program you have given is not showing the code that are stored in QS EEPROM ....!!
and can i use my 16x2 LCD display with QS without any extra chip??
I was trying to use it without any controller but is is going very hard for me. The LCD display was not working properly now i am thinking to use it by QS micro controller...
Harley,
I'm just using the Parallax Serial Terminal. It uses the same connection used to load the program. I think the PST is probably the easiest way to display debug information. I'm already at the computer to program the Prop so I might as well use it to display the debug info.
This is what some of the output looks like.
The above is an EEPROM dump of a different program I'm working on. Using this program I see I have a bug in the EEPROM dump program or the program shown in the partial dump. The first 512 bytes are all $FF. I don't think that is supposed to be the case with either program.
I think this could be a useful debugging tool for programs that modify the EEPROM.
If someone sees a bug in the code I attached to the earlier post, please let me know.
Duane
Ritesh,
Just to be clear. The QuickStart is not a microcontroller. QuickStart is the name of the board to demonstrate the Propeller microcontroller.
You say you have a 16x2 LCD display. That is not much information. I think there are very many 16x2 LCD displays. Many of them do not need extra chips to use with the Propeller microcontroller. There are several drivers for LCD displays in the OBEX.
Duane
I believe this was the program that was loaded into the EEPROM of your QS board.
dwd_TouchDemoByteArray110611i - Archive [Date 2011.06.11 Time 13.21].zip
I originally posted it here.
http://forums.parallax.com/showthread.php?132216-Modified-QuickStart-Demos-and-QuickStart-Projects.
I think it is probably possible to convert the EEPROM data back to Spin. I don't know how to do it.
If you were successful in converting the data to Spin you would loose all the variable and constant names.
always save a working codeversion in this way: if it does work save it under the current name. Then do a "save as..." with a new version number BEFORE changing anything.
Only AFTER saving with a new version-number in the filename start changing the working code to expand your code. This will assue that you can always do a rollback to a working codeversion.
keep the questions coming
best regards
Stefan
The contents of the EEPROM is a compiled Spin/Assembly program, just like an .EXE file on your PC. You can't convert the compiled program back into its source file. There are programs called disassemblers and decompilers that will attempt to do this, but a lot of the information in the original program is missing, like variable names. Sometimes, the disassembler or decompiler will miss things and the resulting source file may not work or not do what the original program does.
I want connect my 8bit 16 character x 2 lines LCD display to QS board, but how without any extra chip..!!
Please post the .spin code of it..!!
What's so hard about a Google search with "KS0066" and "Propeller" for search terms ?
15 seconds brought up a link to this:
http://obex.parallax.com/objects/667/
You really need to do some research yourself. You can't expect to be hand feed information that you demand.
EDIT: PJ beat me to it
That's not what this forum is here for. As mentioned before, you have to do some of the work. P J Allen suggested you look through the Object Exchange. In the Display section, I see at least 8 or 10 different LCD display drivers in the first few screens of objects. One or more of them are likely to work depending on the details of your display. There are many different 16x2 LCDs, but most of them use the same controller chip or its equivalent. It's your job to get the datasheet for your display and either look through it yourself to see if it's one of the types supported by one of the objects in the Object Exchange or post it here and ask for opinions.
Back to square one.
The Quick Start Board is nothing but a PC board with a Propeller Chip, EEPROM, crystal on it. It is not unlike the Propeller Proto Board, and any other general purpose Propeller development boards.
The Quick Start Board can use the curriculum in the Propeller Education Kit series. I suggest use download the PDF's here:
http://www.parallax.com/go/pekit
That should keep you buy for at least two weeks. Then come back and ask specific questions.
Routines are written in the Propeller Tool/Spin Compiler.
Get the datasheet for HD44780: Datasheet
Connect the D0-D7 to the port you want, and the R/S, E, R/W to the other ports. Of course, connect the +5V to the respective supply line, and the grounds too. Contrast? Connect a potentiometer on it.
Most of the stuff in the datasheet and internet are probably self-explanatory.
This Program was running well, but i don't understand this
b7 := clkmode>>7 & 1 'read bit7 of clkmode to variable
repeat
why bit 7 is used here???
It is just an example to demonstrate how you get the value of a single bit. It has no function here. Bit7 was randomly chosen. You asked: So it was not clear for me if you want read the value of single bits or if you just want see clkmode as a bit pattern.
Andy
A good book by Harprit Singh about the SPIN language is a worth buy, and he explained many fundamentals for the Propeller. It is my best birthday present for me.
but we write this code in .spin as !outa[16..23] , if we write code like this outa[16..23] := $FF the output remain high even when we add delay....
please explain why, this happen ??
No. You're talking about the DIRA register.
The DIRA register sets whether an I/O pin is an output or an input. If the DIRA bit is a 0, the I/O pin output driver transistors are turned off (disconnected).
The OUTA register holds the possible output state of the I/O pins. If DIRA[x] is a 1, then OUTA[x] is connected to the I/O pin output driver transistors.
The INA register always contains the state of the I/O pins. If an I/O pin is set as an output, INA still shows the state of the I/O pin (controlled in this case by OUTA).
There's a nice diagram on the Propeller Downloads page and in the Propeller Manual and the Propeller Datasheet that shows how all the I/O registers are connected and how they work functionally.
OUTA[x]~~ or OUTA[x] :=$ff
gives only 1 at output no zero as in case of !OUTA[x]...??
it's always the same with you. You are asking things that you could easy answer yourself if you would read MORE in the manual or if you would test things out yourself
outa[1] := $FE stays zero as the "1" adresses only a single bit
look up in the manual what the command !outa[1] does
keep reading the manual first before asking obvoius things
best regards
Stefan
For e.g.:- If i write
PUB main
dira[16..23]~~ or :=$ff or :=%1111_1111 ' setting direct reg. to output. i.e.1
repeat
!outa[16...23] ' ! is an not operator
waitcnt ( 3_000_000 + cnt) ' this program while have blinking of led at delay of 3_000_0000 cyles of clock freq.
But, when this code is executed the output remain only high why not led blink??
PUB main2
Dira[16..23]~~ or etc....
repeat
OUTA[16..23] :=$ff or :=%1111_1111 or ~~ or SPR [4] :=$ff ' setting output reg. to output i.e. 1
waitcnt( 3_000_000 + cnt )
OTOH, in the first example you use the bit-wise NOT operator (!outa[16..23]). Which is equivalent to outa[16..23] := outa[16..23] ^ $FFA (bit-wise XOR) which toggles the bits every time it runs through the loop. So assuming it starts with $00 (default setting) you'll get $00 > $FF > $00 > $FF ... See the difference?
FWIW, outa[16..23] := $FF is not the same as spr[4] := $FF. The latter is simply an obscure way of saying outa := $FF.
Aouta[16..23] := !outa[16..23] to be exact
please elaborate this there is no symbol in ^ in .spin, and A
I attempted an illustration as to what the loop sequence looks like, i.e. 1st loop run: set to $FF, 2nd loop run: set to $FF etc.
Latest propeller manual (rev 1.2), pages 165 (SPIN) and 326 (PASM).
Why this !outa[x] give both 0 and 1 this point is going over my head