Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

ATiny15 problems ...

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
johanvdb

Bascom Member



Joined: 17 Aug 2004
Posts: 5

PostPosted: Tue Aug 17, 2004 11:13 am    Post subject: ATiny15 problems ... Reply with quote

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
View user's profile
DJD XTREEM

Bascom Member



Joined: 24 Jun 2004
Posts: 190
Location: 127.0.0.1

netherlands.gif
PostPosted: Wed Aug 18, 2004 10:07 am    Post subject: Reply with quote

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
View user's profile Visit poster's website MSN Messenger
johanvdb

Bascom Member



Joined: 17 Aug 2004
Posts: 5

PostPosted: Thu Aug 19, 2004 9:58 am    Post subject: Reply with quote

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
View user's profile
DJD XTREEM

Bascom Member



Joined: 24 Jun 2004
Posts: 190
Location: 127.0.0.1

netherlands.gif
PostPosted: Thu Aug 19, 2004 10:32 am    Post subject: Reply with quote

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
View user's profile Visit poster's website MSN Messenger
johanvdb

Bascom Member



Joined: 17 Aug 2004
Posts: 5

PostPosted: Thu Aug 19, 2004 11:10 am    Post subject: Reply with quote

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 Wink

Johan
Back to top
View user's profile
DJD XTREEM

Bascom Member



Joined: 24 Jun 2004
Posts: 190
Location: 127.0.0.1

netherlands.gif
PostPosted: Thu Aug 19, 2004 11:12 am    Post subject: Reply with quote

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
View user's profile Visit poster's website MSN Messenger
johanvdb

Bascom Member



Joined: 17 Aug 2004
Posts: 5

PostPosted: Thu Aug 19, 2004 12:16 pm    Post subject: Reply with quote

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
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 6198
Location: Holland

blank.gif
PostPosted: Tue Aug 31, 2004 10:23 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum