Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

"Bascom" Butterfly is flying...... (workin it)

"Bascom" Butterfly is flying...... (workin it)

2004-11-13 by John Allen

Hey Gang...

Sorry about being gone for awhile... I wanted to thank both Graham 
Davies and John Scott for there time and advice to get me booted...

  Thanks Boys..!!!    ( the old man could use the help)


Anyway, So far I think we can safly say that using the bata version 
of Bascom  (....7.5) does indeed get you the needed files to get a 
test program going. John Scott also explaned that you can take the 
compiled bascom output HEX file and load that into Butterfly chip 
using the AVR Studio 4 package and the "factory" loader that comes 
programed into in. ( Ya baby !!!  Way Cool  )  This is the first 
step to make the Butterfly Board into sort of "human interface" part 
of an over-all project. The first thing I want to try is geting an 
IrDa complient SPI driven interface built on so you could use the 
butterfly to trsnsfer data to and from various devices while storing 
it on the Butterflies onboard memory chip. 

One thing I did notice about the LIB file after doing some reading 
of the Help file. That is.. (newbies take note) (hey, that includes 
me too).. hehe... :)  The LIB file functions that are used actuly 
use the stardard internal Bascom "LCD" function, but since you elect 
to load the "LCD_BUTTERFLY.LIB" file at the start of your test 
program, wich is M169_LCD.BAS, when using the LCD function, control 
is actually pased to the replacement functions.  WOW... This went 
compleatly over my head for about 2 hours.!!!  (i have now recovered 
from the mellon crash)... 

So.. Going on, I guess i need to do some more checking around, but i 
don't think there will be a current function to work the 
Joystick/Tophat/Enter Switch so we might have to get something going 
from scratch..  To that end I dit try some simple test routines 
using Bascom. The first one I tried was a simple Loop to read 
the "Bitlevel" of the Center (enter) Button whch is connected to 
PB4. The Bascom code works for me...:

'------------------------- tst
Dim S As String * 6

Do
Sound Portb.5 , 100 , 100                                   'Hi BEEP
Sound Portb.5 , 100 , 125                                   'Lo BEEP
Waitms 100
If Pinb.4 = 1 Then S = "OPEN" Else S = "CLOSED"             'tst bit
LCD S
Loop

End
'-------------------------

So far, So good I thought but tring the same thing on the other 
control lines does NOT work. I have not checked on this but I'll bet 
that the DDR's ant PORT's are probally not left setup corectly to 
make the pin reads register correctly. I think the reasion PB4 works 
is because the bootloader uses it to pop-start the user program.

I will get back to fussin with the insect board soon and try to help 
all who want to put this cheap board to good use..!!!  

What a steal-deal...

Thanks for reading all this "newbie bable" 

             jea  (zonker)

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.