총 매입가 37,200,450원

총 매도가 38,245,850원
----------------------------
수익 1,045,400원+배당금




운좋게 배당락없이 주식차액도 생겼습니다.
배당금액이 300,000원정도 추가되면
수익이 145만원정도 될 것으로 예상됩니다.


Posted by KennyShin
,

 

1. 땅값이 오를 것라는 기대

2. 고금리

3. 정부의 정책(박정희시절 과거에 개인에게는 대출을 해주지 않았음)

 

Posted by KennyShin
,
 
 
Clock domain for I2S 48KHz Clock
 
Yellow is I2S Clock(16bit), Green is 48Khz WS waveform.
 
 
 
unsigned char i=0;
int main(void)
{
       /* Initializes MCU, drivers and middleware */
       atmel_start_init();
       /* enable USART module */
       usart_sync_enable(&USART_0);
       i2s_c_sync_enable(&I2S_0);
       /* Configure DMA channels */
       //Configure_Channel_rx();
       Configure_Channel_tx();
       Configure_Channel_i2s_tx();
       
       //_dma_enable_transaction(CONF_USART_RECEIVE_DMA_CHANNEL, false);
       /* Replace with your application code */
       
       
       /* There will be waveform after init. */
       
       /* Breakpoint and Step over to see wave changes. */
       //i2s_c_sync_set_ws_length(&I2S_0, I2SC_MR_DATALENGTH_32_BITS_Val);
       //i2s_c_sync_set_sck_div(&I2S_0, 16);
              
       string[0] = 'a';
       string[1] = 'b';
       string[2] = 'c';
       string[3] = 'd';
       string[4] = 'e';
       string[5] = 'f';
       string[6] = '0';
       string[7] = '1';
       
       i2s_data[0] = 0xAA;
       i2s_data[1] = 0xAA;
       i2s_data[2] = 0xAA;
       i2s_data[3] = 0xAA;
       i2s_data[4] = 0xAA;
       i2s_data[5] = 0xAA;
       i2s_data[6] = 0xAA;
       i2s_data[7] = 0xAA;
       //I2S_0_example();
       i2s_c_sync_set_ws_length(&I2S_0, I2SC_MR_DATALENGTH_16_BITS_Val);
       i2s_c_sync_set_sck_div(&I2S_0, 16);      
       //i2s_c_sync_write_thr(&I2S_0,0x55555555);
       gpio_toggle_pin_level(LED0);
       
       while (1) {
              //if (transferComplete) {
                     ///* reset source and destination address before re-enabling the channel */
                     //_dma_set_source_address(CONF_USART_RECEIVE_DMA_CHANNEL,
                                             //(uint32_t) & (((Usart *)(USART_0.device.hw))->US_RHR));
                     //_dma_set_destination_address(CONF_USART_RECEIVE_DMA_CHANNEL, (uint32_t *)string);
                     //_dma_set_data_amount(CONF_USART_RECEIVE_DMA_CHANNEL, (uint32_t)BUFFER_LEN);
//
                     //_dma_enable_transaction(CONF_USART_RECEIVE_DMA_CHANNEL, false);
                     //transferComplete = 0;
              //}
              //if (receiveComplete) {
                     /* reset source and destination address before re-enabling the channel */
                     _dma_set_source_address(CONF_USART_TRANSMIT_DMA_CHANNEL, (uint32_t *)string);
                     _dma_set_destination_address(CONF_USART_TRANSMIT_DMA_CHANNEL,
                                                  (uint32_t) & (((Usart *)(USART_0.device.hw))->US_THR));
                     _dma_set_data_amount(CONF_USART_TRANSMIT_DMA_CHANNEL, (uint32_t)BUFFER_LEN);
                     _dma_enable_transaction(CONF_USART_TRANSMIT_DMA_CHANNEL, false);
                     
                     
                     
                     _dma_set_source_address(CONF_I2S_DMA_CHANNEL, (uint32_t *)i2s_data);
                     //_dma_set_destination_address(CONF_I2S_DMA_CHANNEL,(void *)REG_I2SC0_THR);
                     //_dma_set_destination_address(CONF_I2S_DMA_CHANNEL,0x4008C024);
                     _dma_set_destination_address(CONF_I2S_DMA_CHANNEL,(void *const)&REG_I2SC0_THR);
                     //(uint32_t) & (((Usart *)(I2S_0.device.hw))->I2SC_THR));
                     _dma_set_data_amount(CONF_I2S_DMA_CHANNEL, (uint32_t)BUFFER_LEN);
                     _dma_enable_transaction(CONF_I2S_DMA_CHANNEL, false);
                     
                     delay_ms(100);
                     gpio_toggle_pin_level(LED0);
       }
}
 
 
 
Posted by KennyShin
,
4월 25일부터 국세청이 '근로·자녀장려금 사전예약신청'을 받고있습니다.

국세청홈택스에서는 따르면 4월 25일부터 30일까지 '근로·자녀장려금 사전예약신청'이 실시됩니다.

장려금은 사전예약도 가능한데 사전예약 신청 후에는 장려금 신청안내문이나 안내문자를 받더라도 다시 신청할 필요가 없습니다.

장려금은 일은 하지만 소득이 적어 생활이 어려운 근로자, 종교인, 사업자(전문직 제외) 가구에 대해 장려금을 지급하는 제도입니다.ㄱ 근로장려금은 △가구원 요건 △총소득(부부합산) 요건 △재산 요건 등 여러 요건을 모두 충족해야 신청이 가능합니다.

단독 가구의 경우 연간 총소득이 2000만원 미만이어야 하고, 홑벌이 가구의 경우 3000만원, 맞벌이 가구의 경우 3600만원 미만만 신청이 가능합니다. 단 자녀 장려금은 홑벌이 가구와 맞벌이 가구 모두 4000만원 미만이면 혜택을 볼 수 있습니다.

한가지 제약조건으로 가구원 모두의 재산을 합산해 2억원 미만이어야 합니다. 재산에는 토지, 건물, 자동차, 예금, 전세보증금 등이 포함되며 부채는 차감되지 않습니다.

대한민국 국적을 보유하지 않았거나, 거주자가 전문직 사업을 영위하고 있다면 신청할 수 없으니 이점 유의하시기 바랍니다.
Posted by KennyShin
,

"

TSC - Technical Safety Concept
HSI - Hardware Software Interface
HSR - Hardware Safety Requirement
SSR - Software Safety Requirement
FMEA - Failure Mode Effect Analysis
SG - Safety Goal
FSR - Functional Safety Requirement
TSR - Technical Safety Requirements
SSR - Software Safety Requirements
SPFM - Single Point Fault Metric
LFM - Latent Fault Metric
PMHF - Probabilistic Metric for random Hardware Failures
ECC - Evaluation of Each Cause of safety goal violation
RF - Residual Fault
DPF - Dual Point Fault
DC - Diagnostic Coverage
FRC - Failure Rate Class
DM - Dedicated Measure
SM - Safety Mechanism
DFA - Dependent Failure Analysis
QM
ASIL A
ASIL B
ASIL C
ASIL D
 

"

Posted by KennyShin
,

This is the example source code for the Cyclic Redundancy Check (CRC) Module with Memory Scanner

(Microchip microcontroller)

 

volatile unsigned int crc = 0;
const uint8_t data[2] __at(0x800) = {0x6C, 0x93};

unsigned char data_size = 0;
unsigned char data_index = 0;

void main(void)
{
    // initialize the device
    SYSTEM_Initialize();
    
    SCANCON0bits.EN = 1;
    SCANCON0bits.MODE = 0;
    SCANCON0bits.INTM = 0;
    SCANLADR = 0x800;
    SCANHADR = 0x801;
    
  
    CRCCON0bits.EN = 1;
    CRCACC = 0xFFFF;
    CRCXOR = 0x1021;
    CRCCON1bits.DLEN = 15;
    CRCCON1bits.PLEN = 15;
    CRCCON0bits.ACCM = 1;
    CRCCON0bits.SHIFTM = 0;
    CRCCON0bits.CRCGO = 1;
    SCANCON0bits.SCANGO = 1;
    while(SCANCON0bits.SCANGO);
    while(CRCCON0bits.BUSY);
    
    crc = CRCACC;
    
    while (1)
    {
        // Add your application code
    }
}

 

 

Will use 0x346C and 0x3493 value at 0x800 and 0x801 address in flash memory

https://www.lammertbies.nl/comm/info/crc-calculation.html

 

On-line CRC calculation and free library

On-line CRC calculation and free library Loading... Introduction on CRC calculations Whenever digital data is stored or interfaced, data corruption might occur. Since the beginning of computer science, people have been thinking of ways to deal with this ty

www.lammertbies.nl

To verify the CRC Calculation, I used On-line CRC Calculation and free library and put the value as "34633493" with Hex. And I got the calculated value as 0xF659 with CRC-CCITT (0xFFFF) and also I got the value as 0xF659 in MPLAB X debug mode as below.

 

 

CRC_PIC16F1618.X.zip
0.99MB

 

 

Posted by KennyShin
,

SAM V71 Xplained Ultra

 

 

SAM V71 Xplained Ultra
SAM V71 Xplained Ultra

The current through this switch is limited with the 390 Ohms resistor to IL = 250/Rlimit = 641 mA.
This is a typical value and according to the datasheet we can expect a minimum of 510 mA and a maximum of 800 mA.
The switch (TPS2113A) has a on-resistance of typically 84 mΩ (and maximal 110mΩ).

 

 

Target USB VBUS control:
Setting the VBUS_HOST_EN signal low will provide power to
VCC_TARGET_USB_P5V0 from VCC_P5V0 allowing target host mode operation.
The switch (STMPS2161) has an on-resistance of RDSon typ = 90mΩ, max = 110mΩ

Each FET in the power path has a RDSon of <50mΩ@VGS= -5V with a current of up to 20A
That means we can expect a maximum voltage drop across the FETs of 50mV@500mA, 100mV@1A and 200mV@2A.
For USB host mode we need a voltage between 4.4V to 5.25V so the drop that we have is ok and leaves some room for a host switch
on-resistance

SAM V71 Xplained Ultra

 

 

Posted by KennyShin
,

MyProject.zip
0.72MB

 

 

Input: SW0(PA9) Button input using external interrupt

Output: LED0 Toggle (Nearby SW0)

Operation: External Interrupt will be generated each edge such as rising and falling

              LED0 toggles when each external interrupt is generated

 

 

#include 

int main(void)
{
    /* Initializes MCU, drivers and middleware */
    atmel_start_init();

   /* Replace with your application code */
   EXTERNAL_IRQ_0_example();
   while (1) {
   }
}

main.c

 

 

#include "driver_examples.h"
#include "driver_init.h"
#include "utils.h"

static void button_on_PA9_pressed(void)
{
    gpio_toggle_pin_level(LED0);
}

/**
 * Example of using EXTERNAL_IRQ_0
 */
void EXTERNAL_IRQ_0_example(void)
{
    ext_irq_register(PIO_PA9_IDX, button_on_PA9_pressed);
}

driver_examples.c

Posted by KennyShin
,