Shop OBEX P1 Docs P2 Docs Learn Events
How to Start hardware of 2Quick start board ...?? - Page 4 — Parallax Forums

How to Start hardware of 2Quick start board ...??

1246

Comments

  • RITESH KAKKARRITESH KAKKAR Posts: 254
    edited 2011-07-16 23:46
    @ Duane,

    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...
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-07-17 00:03
    HShanko wrote: »
    @ Duane,

    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.

    This is what some of the output looks like.
    01E0 | FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    01F0 | FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    Press any key to continue.
    Group $0001.  Starting at EEPROM location $0200
    Base   +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +
    Addr   00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
    ______________________________________________________
    0200 | A0 F7 35 FC 0A 26 01 87 84 8E 06 11 08 00 06 12
    0210 | 07 65 01 64 37 02 06 11 0B 64 38 2E FB 0A 0D 01
    0220 | 87 84 9A 06 11 08 01 87 7F 06 12 02 88 33 37 01
    0230 | FC 0A 80 86 37 03 3D D4 1C 01 87 84 AF 06 11 08
    0240 | 88 0C 3A 3D 09 00 F4 75 01 87 84 C6 06 11 08 01
    0250 | 74 06 11 09 3F 91 78 ED 74 3A 01 38 80 ED FA 0A
    0260 | 12 CC 20 76 4C 01 87 84 CB 06 11 08 01 74 06 11
    0270 | 09 04 61 01 87 84 D1 06 11 08 01 3F 91 06 11 09
    0280 | 74 78 EC 23 01 87 75 06 12 08 01 87 84 D7 06 11
    0290 | 08 01 87 75 88 0E 05 08 01 87 84 E5 06 11 08 01
    02A0 | 78 06 11 09 01 87 84 F0 06 11 08 01 78 74 EC 06
    02B0 | 11 09 36 89 33 37 03 3D D4 18 88 33 37 00 FC 0A
    02C0 | 80 89 37 03 3D D4 1C 01 87 85 06 06 11 08 88 0C
    02D0 | 88 34 ED 3A 3D 09 00 F4 75 01 87 85 1D 06 11 08
    02E0 | 01 74 06 11 09 3F 91 78 ED 74 3A 01 38 80 ED FA
    02F0 | 0A 12 CC 20 76 4C 01 87 85 22 06 11 08 01 74 06
    0300 | 11 09 04 61 01 87 85 28 06 11 08 01 3F 91 06 11
    0310 | 09 74 78 EC 23 01 87 75 06 12 08 01 87 85 2E 06
    0320 | 11 08 01 87 75 88 0E 05 08 01 87 85 3C 06 11 08
    0330 | 01 78 06 11 09 01 87 85 47 06 11 08 01 78 74 EC
    0340 | 06 11 09 36 89 33 37 03 3D D4 18 88 45 3D 92 35
    0350 | FC 0A 19 3F 91 79 01 05 09 01 87 85 5D 06 11 08
    0360 | 00 06 12 07 65 01 64 37 02 06 11 0B 04 FE 8B 32
    0370 | 0D 53 74 61 72 74 20 6F 66 20 4E 6F 72 64 69 63
    0380 | 20 53 74 72 65 73 73 20 52 65 64 75 63 74 69 6F
    0390 | 6E 20 42 75 74 74 6F 6E 73 00 0D 50 72 6F 67 72
    03A0 | 61 6D 20 46 69 6C 65 20 3D 20 00 0D 4E 6F 72 64
    03B0 | 69 63 56 64 64 20 3D 20 00 0D 4E 6F 72 64 69 63
    03C0 | 56 73 73 20 3D 20 00 0D 73 70 69 53 63 6B 20 3D
    03D0 | 20 00 0D 73 70 69 4D 69 73 6F 20 3D 20 00 0D 73
    03E0 | 70 69 4D 6F 73 69 20 3D 20 00 0D 73 70 69 43 73
    03F0 | 6E 20 3D 20 00 0D 73 70 69 43 65 20 3D 20 00 0D
    Press any key to continue.
    

    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
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-07-17 00:09
    i am thinking to use it by QS micro controller...

    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
  • RITESH KAKKARRITESH KAKKAR Posts: 254
    edited 2011-07-17 00:13
    OK, we can see its code.But how to convert the code back to spin language??
  • RITESH KAKKARRITESH KAKKAR Posts: 254
    edited 2011-07-17 00:18
    OK, here is the data sheet of it........!!
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-07-17 00:32
    OK, we can see its code.But how to convert the code back to spin language??

    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.
  • RITESH KAKKARRITESH KAKKAR Posts: 254
    edited 2011-07-17 03:41
    I Don't want to see that Program, but the procedure for others code.....
  • John A. ZoidbergJohn A. Zoidberg Posts: 514
    edited 2011-07-17 05:23
    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).
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-07-17 07:11
    I Don't want to see that Program, but the procedure for others code.....

    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.
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-07-17 08:35
    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.

    keep the questions coming
    best regards

    Stefan
  • Mike GreenMike Green Posts: 23,101
    edited 2011-07-17 09:20
    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.
  • RITESH KAKKARRITESH KAKKAR Posts: 254
    edited 2011-07-17 09:39
    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..!!
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-07-17 09:58
    Please look in the OBEX ..!!
  • PublisonPublison Posts: 12,366
    edited 2011-07-17 10:01
    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 ?

    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
  • Mike GreenMike Green Posts: 23,101
    edited 2011-07-17 10:07
    "Please post the .spin code of 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.
  • PublisonPublison Posts: 12,366
    edited 2011-07-17 11:16
    Hello,

    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:

    http://www.parallax.com/go/pekit

    That should keep you buy for at least two weeks. Then come back and ask specific questions.
  • John A. ZoidbergJohn A. Zoidberg Posts: 514
    edited 2011-07-17 19:59
    There is no need for disassembly to write routines for displaying stuff using the 16x2 LCD (or HD44780 equivalent).

    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. :)
  • RITESH KAKKARRITESH KAKKAR Posts: 254
    edited 2011-07-19 09:29
    _xinfreq = 5_000_000
    ' _clkmode = rcfast
    ' _clkmode = rcslow

    _clkmode = xtal1 + pll16x
    ' _clkmode = xtal1 + pll8x
    ' _clkmode = xtal1 + pll4x
    ' _clkmode = xtal1 + pll2x
    ' _clkmode = xtal1 + pll1x

    PUB main | b7
    dira[23..16]~~ 'LED pins = outputs
    outa[23..16] := clkmode 'write CLKMODE bits to the 8 LEDs
    b7 := clkmode>>7 & 1 'read bit7 of clkmode to variable
    repeat

    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???
  • Mike GreenMike Green Posts: 23,101
    edited 2011-07-19 09:42
    Look at the description of the CLKMODE value in the Propeller Manual and you'll see why bit 7 is used.
  • AribaAriba Posts: 2,690
    edited 2011-07-19 12:24
    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:
    MODE := CLKMODE but how to read MODE it bit wise??
    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
  • John A. ZoidbergJohn A. Zoidberg Posts: 514
    edited 2011-07-19 20:16
    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.
  • RITESH KAKKARRITESH KAKKAR Posts: 254
    edited 2011-07-20 08:51
    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 ??
  • Mike GreenMike Green Posts: 23,101
    edited 2011-07-20 09:00
    "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.
  • RITESH KAKKARRITESH KAKKAR Posts: 254
    edited 2011-07-20 09:22
    I know that but here i am asking why on using instruction
    OUTA[x]~~ or OUTA[x] :=$ff
    gives only 1 at output no zero as in case of !OUTA[x]...??
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-07-20 15:30
    Ritesh!

    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
  • RITESH KAKKARRITESH KAKKAR Posts: 254
    edited 2011-07-20 20:42
    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 )
  • kuronekokuroneko Posts: 3,623
    edited 2011-07-20 20:54
    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?
     OUTA[16..23] :=$ff or :=%1111_1111 or ~~   or SPR [4] :=$ff
    
    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
  • RITESH KAKKARRITESH KAKKAR Posts: 254
    edited 2011-07-20 21:23
    I am not getting you clearly as
    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
  • kuronekokuroneko Posts: 3,623
    edited 2011-07-20 21:28
    $FF > $FF > $FF > $FF .... what does it do??
    This is the content/value of outa[16..23].

    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.
    please elaborate this there is no symbol in ^ in .spin, and A
    Latest propeller manual (rev 1.2), pages 165 (SPIN) and 326 (PASM).
  • RITESH KAKKARRITESH KAKKAR Posts: 254
    edited 2011-07-21 09:10
    My doubt about !outa[x] and outa[x]~~ is remain my mind......
    Why this !outa[x] give both 0 and 1 this point is going over my head
Sign In or Register to comment.