• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ATMEGA48 in Oshonsoft

Status
Not open for further replies.

camerart

Active Member
Hi,
Has anyone programmed ATMEGA48 chips using Oshonsoft?
I've just come across an interesting project written in BASIC, but it is slightly different from Oshonsoft.
Camerart.
 

camerart

Active Member
I don't think Oshonsoft fully supports Atmel.... Probably why no-one does use it!
Hi Ian,
I was given a fairly new radio module for SDR, and as Basic is my only language, I thought I was lucky to find a program written in Basic. I've commented out all of the lines that won't compile, and working through them having some success as most of the program compiles.
I'm trying to get permission, then I'll post it in the hope that someone will help me, and see if the Oshonsoft problem is get round-able.
Thanks, C.
 

jjw

Member
Hi Ian,
I was given a fairly new radio module for SDR, and as Basic is my only language, I thought I was lucky to find a program written in Basic. I've commented out all of the lines that won't compile, and working through them having some success as most of the program compiles.
I'm trying to get permission, then I'll post it in the hope that someone will help me, and see if the Oshonsoft problem is get round-able.
Thanks, C.
Which radio module?
Is the Basic software for controlling the module?
 

jjw

Member
Hi,
Has anyone programmed ATMEGA48 chips using Oshonsoft?
I've just come across an interesting project written in BASIC, but it is slightly different from Oshonsoft.
Camerart.
In Oshonsoft pages it is mentioned that so far some models have limited support.
I understood that ATMEGA48 is fully suppported.
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
You don't need permission to post files... You can upload what you want...

In Oshonsoft pages it is mentioned that so far some models have limited support.
I understood that ATMEGA48 is fully suppported.
I read that the interrupts aren't modeled... Nor are they available in the simulator... You can write your own, but it'll only work outside oshonsoft's sim
 

jjw

Member
Hi,
I don't see any problem in posting the address, which is
file:///C:/Users/Brunel/Deskto
p/PIC/SORTED%20PIC%20PROGRAMS/SDR%20RADIO/OK1HDU%20%28Hamradio,%20electronics,%20travelling,%20photography,%20ok7u...%29.html
I now have all of the files in English, and will post them plus what I have done so far, once I get permission. (I'm pretty sure I need to do that?)
ATMEGA48 is able to be chosen, and opens the *.BAS file ok.
C.
Could you post the link in correct form
 

camerart

Active Member
You don't need permission to post files... You can upload what you want...


I read that the interrupts aren't modeled... Nor are they available in the simulator... You can write your own, but it'll only work outside oshonsoft's sim
Hi I,
Am I correct that if I type TIMER0 or TIMER1 into the program, they should highlight blue? If so then they aren't available in the SIM. They are shown in the ATMEGA data sheet.
C.
 

jjw

Member
Do you want to change the original program?
On that page it is said the program can be compiled with the demo version of the Bascom compiler.
Compiling the program with Oshonsoft it might not fit in the memory.
Is the hex code of the compiled program not included in the downloaded files?
 

camerart

Active Member
Do you want to change the original program?
On that page it is said the program can be compiled with the demo version of the Bascom compiler.
Compiling the program with Oshonsoft it might not fit in the memory.
Is the hex code of the compiled program not included in the downloaded files?
Hi J,
Yes, I want to change the program.
I saw the Bascom part, but not having the skill of versatility, I only use Oshonsoft.
I can check the memory once I get a better compiled program, e,g, nearly completely changed.
Yes, the HEX file is there. See attached.
C.
 

Attachments

Last edited:

sagor1

Active Member
Hi I,
Am I correct that if I type TIMER0 or TIMER1 into the program, they should highlight blue? If so then they aren't available in the SIM. They are shown in the ATMEGA data sheet.
C.
The Amtel 48 has different timer names, like TCCR0A and TCCR0B (control registers), and TCNT0, TCNT1 (actual count registers), etc.. They have different comparators to compare timer value to a register value (something like that). The 16 bit timer relates to TCNT1 (I think?). This is all in the Amtel48 datasheet. I have never programmed these, just that I looked up the timer names. Tried it in the AVR simulator, and these names do turn up in "blue" as you type them in.
 
Last edited:

camerart

Active Member
The Amtel 48 has different timer names, like TCCR0A and TCCR0B (control registers), and TCNT0, TCNT1 (actual count registers), etc.. They have different comparators to compare timer value to a register value (something like that). The 16 bit timer relates to TCNT1 (I think?). This is all in the Amtel48 datasheet. I have never programmed these, just that I looked up the timer names. Tried it in the AVR simulator, and these names do turn up in "blue" as you type them in.
Hi S,
Thanks for looking through the data sheet. The one I have is 660 pages long, so it's not an easy task.
It looks as though it is possible, but as Ian says, perhaps won't work in the SIM. I also suppose that the whole project is also possible, but with a lot of effort, and it will need input from as many as possible.
C.
 

sagor1

Active Member
Hi S,
Thanks for looking through the data sheet. The one I have is 660 pages long, so it's not an easy task.
It looks as though it is possible, but as Ian says, perhaps won't work in the SIM. I also suppose that the whole project is also possible, but with a lot of effort, and it will need input from as many as possible.
C.
I have had timer routines (not interrupts) work properly in the SIM, but had to adjust the timer counts manually to make it "almost time up" to see the effects or the flag being set. Pin change of state interrupts do work in the SIM, I just re-checked one program I had that triggers interrupt on change of RB7 on a 16F690 and it all runs fine. Timer interrupts work fine in the SIM as well (accounting for SIM speeds and adjusted counts).

http://www.electro-tech-online.com/threads/timerinterupt-with-16f628a-and-oshonsoft.122304/
code works just fine in the SIM.
 

camerart

Active Member
Hi S,
I have had timer routines (not interrupts) work properly in the SIM, but had to adjust the timer counts manually to make it "almost time up" to see the effects or the flag being set. Pin change of state interrupts do work in the SIM, I just re-checked one program I had that triggers interrupt on change of RB7 on a 16F690 and it all runs fine. Timer interrupts work fine in the SIM as well (accounting for SIM speeds and adjusted counts).

http://www.electro-tech-online.com/threads/timerinterupt-with-16f628a-and-oshonsoft.122304/
code works just fine in the SIM.
I am assuming that the timer routines (not interrupts) are for the Atmega48 is this correct? If they are written in basic, could you post them please?
C.
 

sagor1

Active Member
Sorry, just with the PIC series. Like I originally posted, I have not programmed the ATMega48 at all, just looked at the spec sheets for timers....
 

camerart

Active Member
Hi,
I have decided to try to use a PIC instead of the recommended ATMEGA chip, and start a new thread also in the Oshonsoft forum.
Thanks for all the efforts.
Camerart.
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top