ATmega 48 Development board - 7 segment display - atmega

I got this development board,
ATMEGA48/88/168/8 AVR Training / Development Board Kit (MC-AVR-48-01)
and I have no idea how to turn on the built-in 7-segment display. Only thing I know is this model/code number and link I have found on Google.
How do I use this display?

There doesn't seem to be a lot of information about this particular board on the internet.
Assuming you don't have a schematic you could
use a multimeter to find out which IO pins the 7-segment display is connected to on your µC (if any - it could be not directly connected)
flash your controller with a little program that writes to its IO ports and see whether this turns on any display segments or changes the voltage level on the display pins

Related

Microchip Studio / STK500 Got 0xc0, expected 0x00

This project started as a typical hobbyist (me) learning how to replicate an Arduino Uno's basic functionality on a breadboard using an ATMEGA328P-PU. The basic intent of the circuit is to trigger 8 otherwise independent Halloween props using a single input, either cycling them continuously or upon command based on an input from a PIR sensor.
After validating the effectiveness of my design on a breadboard I had SMT PCBs professionally made which use ATMEGA328P-AUs (the SMT equivalent).The complete PCB schematic is provided below.
My PCB manufacturer informed me that they received an error when trying to upload my hex file using their STK500 connected to my on board ICSP header. Subsequently, they shipped my prototype PCBs with bare ATMEGA328P-AUs.
Upon receiving the PCBs I was able to use an Arduino Uno as ISP connected to my PCB's on board ICSP header to successfully load the Arduino bootloader, then successfully upload my Arduino program. I have repeated this process successfully multiple times and have subsequently been able to validate that the PCB logic behaves as intended in my application. My pin out on my PCBs ICSP header is identical to the ICSP header on an Arduino. It is 8 pins because I added TX and RX at the top.
I installed Microchip Studio and connected an STK500 via COM1. In Device Programming I selected device ATMEGA328P and Interface ISP. When I click "Read" I get the error depicted below. When I connect an Arduino Uno everything reads fine which leads me to believe that while my circuit contains the components required for a breadboard Arduino it is missing something that the STK500 needs to recognize it as a device.
After searching these forums and Google for similar problems the only two solutions that I can find are to use the internal clock (presumably on the ATMEGA328P?) and to "Disable Debugwire and Close" in Microchip Studio. All of the Debug functionality in Microchip Studio is greyed out for me and it isn't clear to me how I can change clock settings on a device that I can't communicate with. I did specifically incorporate an external clock to improve timing accuracy in my application, though, if that matters.
Any help or insight would be greatly appreciated.

atmega32u4 Failed to enter programming mode

I have designed a custom board using atmega32u4 with a few other components (Such as RTC, memory and etc) but left them empty to test if the microcontroller can be programmed. After just hand soldering the microcontroller and the necessary capacitors and resistors, ATMEL Studio can't read device signature.I'm using AVRISP MKII. This board was inspired by ARDUINO ProMicro in design. The things I tried to solve it:
Measure all 3.3 volt supply lines and all of the grounds. (They all correspond with PCB and schematic)
Checked SPI lines to see if microcontroller receives commands from the programmer by using oscilloscope.
I tried removing the 16MHZ crystal, still the same.
I reflowed the microcontroller since it is a QFN type (atmega32-MU package) and I have a few via holes under the micro for flux to come out.
I have properly washed the board after reflow.
I have AREF grounded with a 0.1uF capacitor and !HWB pin (PE7) is left empty. I didn't ground it.
I tested the programmer with an actual promicro board and it programs fine.
I think I'm missing something but I don't know what... I'd be grateful if you guys could help me. Attached is the schematic of the circuit.
The micro controller RESET is indicated by MICRO RST on pin 13. That RESET on PB4 is for another device which is not populated yet and left empty, I checked Pin 13 with Oscilloscope and it seemed working fine and going to zero at the first moment of programming. Also MISO and MOSI and SCK were sending signals to the relevant pins.
Thanks
If you are programming the board with ISP you have to connect RESET to the programmer. otherwise the controller could not be programmed!
Image from microcontroller.net
It seems that your RESET is on PB4 but for programming it should be connected to RESET of uC.
So, I realized the problem after almost a month! I had removed the 16MHz crystal from the circuit and this caused the problem with programming. Now, after placing the crystal the program is successfully uploaded to the ATMEGA32U4.

PWM/PPM Output misses some edges

I am using ESP8266 (NODEMCU 3.0 or something) to make a quadcopter. Ive connected ardu pro mini to RC receiver so I am reading PPM values from it. Pro mini sends data with tx to ESP8266. ESP reads it with software serial with 115200 baudrate. I am communicating with MPU9255 (Waveshire) via I2C either.
My problem is that I cant fully controll my brushless motors. When I was using arduino instead of ESP8266, servo library was the best and reliable. But ESP's servo library is different, since its not AVR, and problems occurs. First of the servo library didnt want to work on most frequencies. I mean default is 50Hz (20000uS) and in this state ESC of motors did armed but unfortunatelly when changes was fast and short (1250-> 1370 -> 1250) it did miss that change like nothing happnd... This makes my D value in PID controller useless...
Sometimes on 100Hz freq all was working fine, but sometimes not...
When Ive started to use analogWrite only 500Hz was working fine, rest of freq didnt want to arm ESCs.
PS. I am using 3.3V to 5V converter for PPM/PWM pins so I am sure that the signal is fine for ESCs.
PS2. I dont have any osciloscope unfortunately.
The ESP82266 present on your module is a RF transceiver integrated circuit that can handle WiFi communication, both configured as a slave to a microcontroller such as the ones present on various Arduino boards, or as a standalone chip by having it's on-board Tensilica L106 32-bit processor programmed via an external SPI flash memory. If used as a slave, the communication between, for example, an Arduino an the ESP82266 can be done using different protocols such as SPI / SDIO or I2C / UART interfaces. Googling a comprehensive Tensilica L106 user guide on the internet doesn't seem an easy task, and it looks as if some people have already failed to find it. If you're seeking to add Wi-Fi capabilities to your quadcopter the solution I suggest is having the Arduino take control over the servos, motors, etc. and hand off messages via SPI to your ESP82266 module. If this isn't the answer you are looking for, please try to be clearer about it, maybe find someone to do as an English translator for you.
However, if this is what you're concerned about, and you would like to use the ESP82266 module as as standalone solution, please link its built-in processor datasheet and the relevant parts of the quadcopters code that might need debugging.

Atmega8 necessary circuit for standalone working

I am developing a project to monitor solar voltage and battery voltage by displaying them on an LCD. I programmed an Atmega8 with an arduino. When I attached the LCD with the board it worked pretty well. So I detached it from board and made a breadboard circuit as described on this page.
It didn't work this time. I checked all the connections many times but could not get to any point. Kindly guide me how to make a standalone atmega8 circuit to display something on an LCD.
Start slowly. There are some pitfalls when migrating to your own design (and yes, there's another forum for that). If you're using an external crystal oscillator, make sure that you've programmed the Atmel chip to use it by programming the appropriate fuse bits. After that, look to see if you can toggle a single output of the device. Ideally with a single LED connected, so you can see if the output port is changing state.
Some LCD controllers can require relatively precise timings, so if you have a logic analyser you can examine the waveforms. Otherwise, check your clock timing by turning on and off an LED every ten seconds (or so) and use a stopwatch to count ten or twenty of the LED flashes. You can see what your clock speed is working out to be, and verify that it's the right clock, etc.
You need to program the fuses correectly for standalone operation when no crystal is attached (Arduino has an external crystal) Hence, for running an Atmel using the internal clock, the clock fuse needs to be programmed correctly. In the datasheet you will find the description.

Error message in AVR studio4

I have recently purchased an AVR USB programmer from robokits.co.in, was trying to program atmeg8 using AVR studio4 and I get the following when I click on the program options:
a problem occurred when executing the command. make sure u are using
the correct programming method. current mode is ISP verify that the
device is placed in the correct socket, and that the ISP cable is
connected properly.check that the programming frequency specified in
the main page is well below 1/4th of the clock frequency of the
device.
I have tried all that I could think of, I have checked the connections and the freq is below 1/4th of the device.
But that doesn't solve this problem.
I have made the circuit for blinking LEDs program.
See the image for details
Double check that the jumpers on the programming board that you are using (if you are) are set correctly.
Well this is hardly the venue to trouble shoot different hardware issues.
So if you think there is an issue with the programmer, contact www.robokits.com.
I would start with contacting robokits.
Since you can't even enter the programming mode, you can ignore your source code.
You should be able to verify fuses/lock bits w/o programming any code into the Mega8.
To give you a head start before you contact robokits:
1. Verify the programmer is properly installed on your computer following robokits instructions.
2. Verify the +5Vdc on Pins 20 & 7 of the Mega8
3. Verify Pins 22 & 8 are grounded properly.
4. Verify that Pin 1 is pulled up to +5Vdc (when the programmer is not connected)
Pin 1 should be pulled down by the programmer when it attempts to connect to the Mega8
5. Double check all the connections between the programmer to your target. Since the programmer is a 10 pin IDC and the test circuit has an in-line style connector you must have an IDC cable that has been broken out, stripped and connected to the test circuit.
Is the Target "fresh"? i.e. Never been programmed? Regardless: have you tried more than one?
Do you have any power being applied to the ISP header (target) prior to connecting the programmer?
You may also want to verify there are no shorts on your Target pulling the ISP Supply down, see the pinout link below.
If your jumper settings are USB-HID and Slow SCK == open && ISP Supply == short then you shouldn't supply and power to the ISP connection from the target.
If you are not supplying and voltage to the ISP header, maybe you should try that. Remove the ISP Supply jumper and apply 5V from your target application's supply to the ISP interface:
AVR ISP Pinout
Pin 2 on the ISP interface should be +5Vdc in reference to Pin 10 (gnd)
When I got a similar message while programming other Atmel integrated circuits I enabled the "Use external reset" setting that exists in the GUI of AVR Studio 4 (was removed in 5 and returned in Atmel Studio 6).
I am not sure if that option exists or does anything with your programmer since I have never used it.

Resources