Prop chip newbie questions.
Mike B.
Posts: 31
I'm starting to see the light on the Spin language. (I'm on a dark road, heavy fog, one headlight out and trying to see a birthday candle at 1 mile. )
First question:· Let's say I am using an object from the exchange that has 15-20 methods in it but I am only using one of the methods in my application.· At compile time does the ENTIRE object get compiled into the Prop or just the method(s) I actually use get compiled?
Second question:· I have been playing with the Parallax serial driver and have it workig for my Scott Edwards 4 X 20 LCD display. (really easy to do, I love that!).· Now I want to hook up a 4 X 4 serial keypad and display the button pressed on the LCD.· My question is this.· The driver says it must be init'ed before use.· The LCD is on pin 24 and the keypad is on 16.· Does calling the init method with the LCD pin(24) also set up the keypad pin(16) so that all I do is call charin(16,9600,N#inv,8) or do I have to do something· different to input on one pin and output on another??
Keep in mind that I have never spoken Spin so keep any replys SIMPLE for me!!·
Thanks, Mike B.
First question:· Let's say I am using an object from the exchange that has 15-20 methods in it but I am only using one of the methods in my application.· At compile time does the ENTIRE object get compiled into the Prop or just the method(s) I actually use get compiled?
Second question:· I have been playing with the Parallax serial driver and have it workig for my Scott Edwards 4 X 20 LCD display. (really easy to do, I love that!).· Now I want to hook up a 4 X 4 serial keypad and display the button pressed on the LCD.· My question is this.· The driver says it must be init'ed before use.· The LCD is on pin 24 and the keypad is on 16.· Does calling the init method with the LCD pin(24) also set up the keypad pin(16) so that all I do is call charin(16,9600,N#inv,8) or do I have to do something· different to input on one pin and output on another??
Keep in mind that I have never spoken Spin so keep any replys SIMPLE for me!!·
Thanks, Mike B.
Comments
Does the keyboard really need no input connection? You should read the specs of the keyboard. Normally·a keyboard also has an input line for switching on the num-lock and caps-lock lights.
** after re-read: oh keypad ... no keyboard ;o) so, maybe no input **
2·things you can do alternatively:
1. define 2 objects using the same serial driver. For example:
obj
kb: "FullDuplexSerial"
lcd: "FullDuplexSerial"
2. or use the serial driver that allows to have 4 serial interfaces. I think it's named FDSerial4P or something alike.
With·FullDuplexSerial you can setup·Tx and Rx on any pin you want. But of course the·baud-rate must be the same.
Post Edited (MagIO2) : 6/19/2010 3:14:04 PM GMT
This means you would do
Of course, this presumes both devices are set to 9600 baud and there is no inversion.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Now to make a keypad entry play one of the sound files in my quadravox chip corder..
Thanks again. Mike B.