View previous topic :: View next topic |
Author |
Message |
johanvdb
Joined: 17 Aug 2004 Posts: 5
|
Posted: Tue Aug 17, 2004 11:13 am Post subject: ATiny15 problems ... |
|
|
Hi,
I'm able to compile a simple piece of code (LED flasher) for the ATiny15 and I can program the MCU from out of BASCOM. However, the code does not run. I can also verify the code from out of the programmer, so that is fine. When I download the code to another MCU (8535) it works fine. I do however use the header as in the atiny15 sample provided with BASCOM (which I don't use when taretting the 8535 however).
Can it be that there is something wrong with the ATiny15? Maybe I need to define the internal clock speed using the OSCAL register (0xff for max speed). It is a 15LS, maybe I need to run on 3V instead of 5V?
I'm not sure ... anybody an idea on what the problem can be?
Thanks!
Johan |
|
Back to top |
|
|
DJD XTREEM
Joined: 24 Jun 2004 Posts: 190 Location: 127.0.0.1
|
Posted: Wed Aug 18, 2004 10:07 am Post subject: |
|
|
Please post the code you use..
Because the smaller AVR procs have some problems with some of the statements off bascom.. _________________ Bascom AVR 1.11.8.8 full version
STK500 Programmer
ISP Programmer |
|
Back to top |
|
|
johanvdb
Joined: 17 Aug 2004 Posts: 5
|
Posted: Thu Aug 19, 2004 9:58 am Post subject: |
|
|
Ok ... here's the code:
Code: |
$tiny
$regfile = "at15def.dat"
$noramclear
config pinb.4 = output
main:
toggle portb.4
wait 1
goto main
|
For the moment I reverted back to the 2343 ... but I would rather want to benefit from the new parts like the 15 or 12 ...
Johan[/code] |
|
Back to top |
|
|
DJD XTREEM
Joined: 24 Jun 2004 Posts: 190 Location: 127.0.0.1
|
Posted: Thu Aug 19, 2004 10:32 am Post subject: |
|
|
johanvdb wrote: | Ok ... here's the code:
Code: |
$tiny
$regfile = "at15def.dat"
$noramclear
config pinb.4 = output
main:
toggle portb.4
wait 1
goto main
|
| Well the code works fine for me on a 90s2343 at Internal Oscilator.
I did set the fusebit for internal oscilator and corrected the speed to 1mhz.. _________________ Bascom AVR 1.11.8.8 full version
STK500 Programmer
ISP Programmer |
|
Back to top |
|
|
johanvdb
Joined: 17 Aug 2004 Posts: 5
|
Posted: Thu Aug 19, 2004 11:10 am Post subject: |
|
|
Indeed ... on 2343 everything is fine. I'm talking tiny15 here ...
Oh ... now you talk aboutthe 2343 internal RC osc. have you ever tried a software UART with it? I can't get it to send something correctly, probably the RC osc is way of 1Mhz
Johan |
|
Back to top |
|
|
DJD XTREEM
Joined: 24 Jun 2004 Posts: 190 Location: 127.0.0.1
|
Posted: Thu Aug 19, 2004 11:12 am Post subject: |
|
|
Well as far i know the 2343 can't be used for serial comunication.. it doesn't have a uart.. And as i know off not even controll for a software uart.. _________________ Bascom AVR 1.11.8.8 full version
STK500 Programmer
ISP Programmer |
|
Back to top |
|
|
johanvdb
Joined: 17 Aug 2004 Posts: 5
|
Posted: Thu Aug 19, 2004 12:16 pm Post subject: |
|
|
Oh yes, you can:
[CODE]
$crystal = 1000000
config pinb.4 = output
open "COMB.3:2400,8,N,1" for output as #1
main:
toggle portb.4
print #1, "Hello World"
wait 1
goto main
[/CODE/]
The only problem seems to be the baudrate. A deviation from the clockspeed by 10% would mean a 10% deviation for the timings of the serial bitstream, that would hurt and definitely generate gibberish on the receiving terminal.
Has anybody experience setting up a software UART on a device with internal RC oscillator?
Johan |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Aug 31, 2004 10:23 pm Post subject: |
|
|
Hi
In version 1.11.7.4 waitms uses SBIW that is not supported in the tiny15. In the next beta , other asm is ued so waitms will worik with the tiny15.
But tiny15 is best to be programmed with asm. _________________ Mark |
|
Back to top |
|
|
|