Peace be upon you. I have a problem in atmega32 uc

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i have problem in uc atmega32
------------
I can not remove internal clock
i use bascom avr
use very simple serial rs232 programer
at-prog for burn hex code
-----------
how can i remove internal osc crystal fuse bit ?
----------

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

use this fuse calc to find out the values... We are not sure on what other settings you want.. so it is difficult to say the exact values.. http://www.engbedded.com/fusecalc

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

eg_coder wrote:
i have problem in uc atmega32
------------
I can not remove internal clock
i use bascom avr
use very simple serial rs232 programer
at-prog for burn hex code
-----------
how can i remove internal osc crystal fuse bit ?
----------

Do you have an external clock to use instead of the internal clock?

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

cooluser wrote:
use this fuse calc to find out the values... We are not sure on what other settings you want.. so it is difficult to say the exact values.. http://www.engbedded.com/fusecalc

I want to remove internal clock
and use external crystal xt

i use this program to burn hex code
http://www.speedy-bl.com/avr-pro...
------------------

yes . i have alot of crystal 8mhz . 4mhz ....
or use RC OSC ...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

i use this program to burn hex code
http://www.speedy-bl.com/avr-pro...

That software does not seem to be able to program the AVR fuses. Thus, you can not use it to change from the internal clock source to anything else.

You need another programming software. And that, in turn, might require a different programming hardware.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:
Quote:

i use this program to burn hex code
http://www.speedy-bl.com/avr-pro...

That software does not seem to be able to program the AVR fuses. Thus, you can not use it to change from the internal clock source to anything else.

You need another programming software. And that, in turn, might require a different programming hardware.

OK . Thank you very much
i will made usbasp .
---------------------------
I want to help in another problem
i have lcd 16 x 2 and burn simple code to atm32
using bascom avr
program working very good in Proteus
but in practical not working .
Each wire is connected correctly..
but not working

Config Lcdpin = Pin , Db4 = Portc.3 , Db5 = Portc.2 , Db6 = Portc.1 , Db7 = Portc.0 , E = Portc.4 , Rs = Portc.5
Config Lcd = 16 * 2
Locate 1 , 1 : Lcd "eg_coder"
do
loop
end

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to the Forum.

Did you make the PCB or is it a commercial board?

Does the PCB run other programs correctly?

Is this the first program you have ever run on this board?

Have you adjusted the contrast control to see if the text is actually there?

On start up do you see one row of "black boxes" on the LCD as the LCD initializes?

I don't have time to test the code but for right now try:

$regfile = "m32def.dat"
$crystal = 8000000
$hwstack = 32
$swstack = 10
$framesize = 40

Config LCD = 16 x 2
Config LCDpin = pin, ...
Initlcd
waitms 100
cls
lcd "Hello"
do
loop

If this is a new board, do you have by-pass caps, (0.1uF) on the Vcc/Ground pin and AVcc/ground pin?

Is AVcc tied to Vcc?

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Turn off the jtag, which hogs up portc. You write MCUCR = 0x80 twice.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
Welcome to the Forum.

Did you make the PCB or is it a commercial board?

Does the PCB run other programs correctly?

Is this the first program you have ever run on this board?

Have you adjusted the contrast control to see if the text is actually there?

On start up do you see one row of "black boxes" on the LCD as the LCD initializes?

I don't have time to test the code but for right now try:

$regfile = "m32def.dat"
$crystal = 8000000
$hwstack = 32
$swstack = 10
$framesize = 40

Config LCD = 16 x 2
Config LCDpin = pin, ...
Initlcd
waitms 100
cls
lcd "Hello"
do
loop

If this is a new board, do you have by-pass caps, (0.1uF) on the Vcc/Ground pin and AVcc/ground pin?

Is AVcc tied to Vcc?

JC

Thanks for help
ok ...
This is not the first program
Made several experiments on the same board and the same uc (flasher led . 7seg count ...... )
working good
--------
no.i dont use pcb
i use breadboard
---------
yes i see one row "black boxes" on the LCD
when power on circuit
----------
i test your code but not work
----------
yes i use already capc 0.1uf and 10 uf
Parallel to vcc and gnd
----------
i test lcd with pic uc pic16f84a
working good !!!
-----------------
I do not know where the problem ØŸ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
Turn off the jtag, which hogs up portc. You write MCUCR = 0x80 twice.

i serch youtube about jtag
http://www.youtube.com/watch?v=I...
how can i Turn off the jtag
by code or by programer ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

EDIT: Gave an answer but it was not for Bascom.

Mislead again by a previous poster. :? It will not happen again.

eg_coder wrote:
how can i Turn off the jtag
by code or by programer ?

@eg_coder, see DocJC's post below.

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

Last Edited: Mon. Feb 3, 2014 - 07:17 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

i serch youtube about jtag

Maybe the datasheet? [but that requires reading]
Maybe this site? [but that requires computer skills]

How'd the "video generation" approach work out for you?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Port C has several functions in the M32 chip.

The easiest was to disable (turn off) the JTAG function n Bascom is to use the instruction:

Disable JTAG

Put that at the start of the program.

Report back on how you are doing.

JC