M68DEMO908GB60 - HELP NEEDED

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

M68DEMO908GB60 - HELP NEEDED

2,070 次查看
Yaron_MD
Contributor I
I'm trying to make a simple program that will light led 1 fo half a second, turn if off, and then light led 2 for half a second. but i can't seem to make it happen...
can someone please help me with this simple task?
Thank you,
Yaron
标签 (1)
0 项奖励
回复
3 回复数

853 次查看
peg
Senior Contributor IV
Hi Yaron,
 
Here is a small programme for this demo board I wrote a few weeks ago.
I did this to determine what timings are needed to produce the desired flickering look of an LED.
It is about as simple as you can get, but does the job. You can add a few more internal loops in the delay subroutine to make it flash slower. Of course it would be done differently if it were part of an actual application!
 
Regards
David
 
0 项奖励
回复

853 次查看
Nefertum
Contributor I
Hello
If you coul provide your code, perhaps I can give you some advices, I'm currently working with a demo board like yours. However, take a look to sample code coming with codewarior, it can be very useful.
Remeber: the board is equipped with an EXTERNAL oscillator with a frequency of 32768Hz. Keep this in mind when you set the internal clock generator (ICG) in FEE mode, (see HCS08 family reference documentation). Then you can initialize a timer and a timer overflow interrupt to change status of the leds.

Nefertum
0 项奖励
回复

853 次查看
J2MEJediMaster
Specialist I
Have you checked to see if there is some example code that came with the CodeWarrior installation? One of these programs typically blinks an LED on the board. Look for a (Codewarrior_Examples) directory, which should contain example code. If you're using a different toolset, ideally, they'll have provided code examples as well.

---Tom
0 项奖励
回复